|
22 | 22 | * Boston, MA 02110-1301 USA
|
23 | 23 | */
|
24 | 24 |
|
25 |
| -package li.klass.fhem.domain; |
| 25 | +package li.klass.fhem.domain |
26 | 26 |
|
27 |
| -import org.junit.Test; |
28 |
| - |
29 |
| -import li.klass.fhem.domain.core.DeviceXMLParsingBase; |
30 |
| -import li.klass.fhem.domain.core.FhemDevice; |
31 |
| - |
32 |
| -import static org.assertj.core.api.Assertions.assertThat; |
33 |
| - |
34 |
| -public class SomfyDeviceTest extends DeviceXMLParsingBase { |
35 |
| - @Test |
36 |
| - @SuppressWarnings("unchecked") |
37 |
| - public void should_read_device() { |
38 |
| - FhemDevice device = getDeviceFor("SOMFY_WZ_EG_1"); |
39 |
| - assertThat(device).isNotNull(); |
40 |
| - assertThat(device.getState()).isEqualTo("stop"); |
41 |
| - assertThat(device.getWebCmd()).containsExactly("auf", "stop", "ab"); |
42 |
| - } |
| 27 | +import li.klass.fhem.domain.core.DeviceXMLParsingBase |
| 28 | +import org.assertj.core.api.Assertions.assertThat |
| 29 | +import org.junit.Test |
43 | 30 |
|
| 31 | +class SomfyDeviceTest : DeviceXMLParsingBase() { |
44 | 32 | @Test
|
45 |
| - @SuppressWarnings("unchecked") |
46 |
| - public void should_add_auf_ab_and_stop_as_webcmd_even_if_not_present() { |
47 |
| - FhemDevice device = getDeviceFor("SOMFY1"); |
48 |
| - assertThat(device).isNotNull(); |
49 |
| - assertThat(device.getState()).isEqualTo("stop"); |
50 |
| - assertThat(device.getWebCmd()).containsExactly("auf", "stop", "go-my", "ab"); |
| 33 | + fun should_read_device() { |
| 34 | + val device = getDeviceFor("SOMFY_WZ_EG_1") |
| 35 | + assertThat(device).isNotNull |
| 36 | + assertThat(device.state).isEqualTo("stop") |
51 | 37 | }
|
52 | 38 |
|
53 |
| - @Override |
54 |
| - protected String getFileName() { |
55 |
| - return "somfy.xml"; |
56 |
| - } |
| 39 | + override fun getFileName() = "somfy.xml" |
57 | 40 | }
|
0 commit comments