/** * Test method for {@link * org.hbird.business.groundstation.configuration.GroundStationDriverConfiguration#getAddress()}. */ @Test public void testGetAddress() { assertEquals(config.getDeviceHost() + ":" + config.getDevicePort(), config.getAddress()); config.setDeviceHost("127.0.0.1"); config.setDevicePort(9450); assertEquals(config.getDeviceHost() + ":" + config.getDevicePort(), config.getAddress()); }
/** * Test method for {@link * org.hbird.business.groundstation.configuration.GroundStationDriverConfiguration#setDevicePort(int)}. */ @Test public void testSetDevicePort() { assertEquals(GroundStationDriverConfiguration.DEFAULT_DEVICE_PORT, config.getDevicePort()); config.setDevicePort(5433); assertEquals(5433, config.getDevicePort()); config.setDevicePort(11992); assertEquals(11992, config.getDevicePort()); }
/** * Test method for {@link * org.hbird.business.groundstation.configuration.GroundStationDriverConfiguration#GroundStationDriverConfiguration(java.lang.String, * java.lang.String, int, java.lang.String, java.lang.String, java.lang.String, int, * java.lang.String, java.lang.Long, int, int, long, long)} . */ @SuppressWarnings("deprecation") @Test public void testGroundStationDriverConfigurationStringStringIntStringStringStringIntStringLongIntIntLongLong() { config = new GroundStationDriverConfiguration( "SERVICE-ID", "BETA-VERSION", 4000L, "GS-ID", "DEVICE-NAME", "DEVICE-TYPE", 3002, "localhost", 2345L, 6674L, 9831L); assertEquals("SERVICE-ID", config.getServiceId()); assertEquals("BETA-VERSION", config.getServiceVersion()); assertEquals(4000, config.getHeartBeatInterval()); assertEquals("GS-ID", config.getGroundstationId()); assertEquals("DEVICE-NAME", config.getDeviceName()); assertEquals("DEVICE-TYPE", config.getDeviceType()); assertEquals(3002, config.getDevicePort()); assertEquals("localhost", config.getDeviceHost()); assertEquals(2345, config.getDevicePollInterval()); assertEquals(6674L, config.getPreContactDelta()); assertEquals(9831L, config.getPostContactDelta()); }