| | |
| | | void registersDevelopmentSimulatorBeforeApplicationReady() throws Exception |
| | | { |
| | | DeviceAdapterRegistry registry = mock(DeviceAdapterRegistry.class); |
| | | var runner = new DeviceAdapterRuntimeConfig().registerDevelopmentSimulatorAdapter(registry); |
| | | var runner = new DeviceAdapterRuntimeConfig().registerDevelopmentSimulatorAdapter(registry, 15021); |
| | | |
| | | runner.run(new DefaultApplicationArguments(new String[0])); |
| | | |
| | |
| | | verify(registry).synchronize(adapter.capture()); |
| | | assertEquals("dev-sim", adapter.getValue().adapterCode()); |
| | | assertEquals("127.0.0.1", adapter.getValue().host()); |
| | | assertEquals(15020, adapter.getValue().port()); |
| | | assertEquals(15021, adapter.getValue().port()); |
| | | assertEquals(5000, adapter.getValue().pollIntervalMs()); |
| | | } |
| | | } |