removed ignored groovy test (#358)

Signed-off-by: Kai Kreuzer <kai@openhab.org>
This commit is contained in:
Kai Kreuzer 2018-06-09 20:46:08 +02:00 committed by Martin van Wingerden
parent 3aa49789a4
commit 0eec30045e
5 changed files with 6 additions and 90 deletions

View File

@ -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>

View File

@ -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

View File

@ -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

View File

@ -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
}
}