\r
import static org.hamcrest.core.IsEqual.equalTo;\r
import static org.junit.Assert.assertThat;\r
+import static org.junit.Assert.assertTrue;\r
\r
import org.junit.Test;\r
\r
System.clearProperty("MSB_ADDR");\r
}\r
\r
+ @Test\r
+ public void getMsbServerIpTest() {\r
+ System.setProperty("MSB_ADDR", "10.54.23.79");\r
+ assertThat("10.54.23.79", equalTo(MicroServiceConfig.getMsbServerIp()));\r
+ System.clearProperty("MSB_ADDR");\r
+ }\r
+\r
+ @Test\r
+ public void getMsbPortTest() {\r
+ System.setProperty("MSB_PORT", "110");\r
+ assertTrue(110 == MicroServiceConfig.getMsbServerPort());\r
+ System.clearProperty("MSB_PORT");\r
+ }\r
+\r
+ @Test\r
+ public void getMsbPortTestNonnumeric() {\r
+ System.setProperty("MSB_PORT", "test");\r
+ assertTrue(80 == MicroServiceConfig.getMsbServerPort());\r
+ System.clearProperty("MSB_PORT");\r
+ }\r
+\r
+ @Test\r
+ public void getMsbPortTestNullValue() {\r
+ assertTrue(80 == MicroServiceConfig.getMsbServerPort());\r
+ }\r
+\r
@Test\r
public void getServiceIpTest() {\r
System.setProperty("SERVICE_IP", "test");\r