mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-10 21:31:53 +01:00
removed ignored groovy test (#358)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
This commit is contained in:
parent
3aa49789a4
commit
0eec30045e
@ -3,6 +3,5 @@
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src/test/java"/>
|
||||
<classpathentry kind="src" path="src/test/groovy"/>
|
||||
<classpathentry kind="output" path="target/test-classes"/>
|
||||
</classpath>
|
||||
|
@ -22,7 +22,6 @@
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.groovy.core.groovyNature</nature>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,6 +1,5 @@
|
||||
source.. = src/test/java/,\
|
||||
src/test/groovy/
|
||||
output.. = target/test-classes/,target/classes
|
||||
source.. = src/test/java/
|
||||
output.. = target/test-classes/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
about.html
|
||||
|
@ -1,81 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2014-2015 openHAB UG (haftungsbeschraenkt) and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*/
|
||||
package org.openhab.core.events
|
||||
|
||||
import static org.hamcrest.CoreMatchers.*
|
||||
import static org.junit.Assert.*
|
||||
import static org.junit.matchers.JUnitMatchers.*
|
||||
|
||||
import org.eclipse.smarthome.core.events.Event
|
||||
import org.eclipse.smarthome.core.events.EventFilter
|
||||
import org.eclipse.smarthome.core.items.ItemProvider;
|
||||
import org.eclipse.smarthome.core.items.events.ItemStateEvent
|
||||
import org.eclipse.smarthome.core.library.items.StringItem
|
||||
import org.eclipse.smarthome.test.OSGiTest
|
||||
import org.junit.Before
|
||||
import org.junit.Ignore
|
||||
import org.junit.Test
|
||||
import org.openhab.core.library.types.StringType
|
||||
import org.openhab.core.types.Command;
|
||||
import org.openhab.core.types.State;
|
||||
import org.openhab.core.types.UnDefType;
|
||||
|
||||
/**
|
||||
* Tests for {@link EventDelegate}.
|
||||
*
|
||||
* @author Kai Kreuzer - Initial version
|
||||
* @since 2.0
|
||||
*/
|
||||
class EventDelegateTest extends OSGiTest {
|
||||
|
||||
def state
|
||||
|
||||
EventPublisher publisher
|
||||
|
||||
org.eclipse.smarthome.core.events.EventSubscriber eventSubscriber = new org.eclipse.smarthome.core.events.EventSubscriber() {
|
||||
@Override
|
||||
public void receive(Event event) {
|
||||
state = (event as ItemStateEvent).itemState
|
||||
}
|
||||
Set getSubscribedEventTypes() {};
|
||||
EventFilter getEventFilter() {
|
||||
return null
|
||||
};
|
||||
}
|
||||
|
||||
@Before
|
||||
void setUp() {
|
||||
registerService([
|
||||
getAll: {
|
||||
[
|
||||
new StringItem("Test")
|
||||
]
|
||||
},
|
||||
addProviderChangeListener: {},
|
||||
removeProviderChangeListener: {},
|
||||
allItemsChanged: {}] as ItemProvider)
|
||||
registerService(eventSubscriber, org.eclipse.smarthome.core.events.EventSubscriber.class.name, ["event.topics":"smarthome/*"] as Hashtable)
|
||||
publisher = getService(org.openhab.core.events.EventPublisher, EventPublisherDelegate)
|
||||
assertThat publisher, is(notNullValue())
|
||||
}
|
||||
|
||||
@Test @Ignore
|
||||
void testMapUnDefType() {
|
||||
publisher.postUpdate("Test", new StringType("ABC"))
|
||||
waitFor ( { state != null }, 2000)
|
||||
assertEquals "ABC", state.toString()
|
||||
|
||||
publisher.postUpdate("Test", UnDefType.NULL)
|
||||
waitFor ( { state != null }, 2000)
|
||||
assertEquals org.eclipse.smarthome.core.types.UnDefType.NULL, state
|
||||
|
||||
publisher.postUpdate("Test", UnDefType.UNDEF)
|
||||
waitFor ( { state != null }, 2000)
|
||||
assertEquals org.eclipse.smarthome.core.types.UnDefType.UNDEF, state
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user