@Test public void testAppIdInConfigFile() throws IOException { env.setSystemProperty(LocalConfigConnector.PROPERTIES_FILE_PROPERTY, PROPERTY_FILE_NAME); connector.setFileProvider(StubbedOpenFileLocalConfigConnector.fileContentsFromString(PROPERTY_FILE_NAME, APP_ID_PROPERTY)); assertTrue(connector.isInMatchingCloud()); assertEquals(APP_ID, connector.getApplicationInstanceInfo().getAppId()); }
@Test public void testAppIdInFileAndSystem() throws IOException { env.setSystemProperty(LocalConfigConnector.PROPERTIES_FILE_PROPERTY, PROPERTY_FILE_NAME); env.setSystemProperty(LocalConfigConnector.APP_ID_PROPERTY, APP_ID); connector.setFileProvider(StubbedOpenFileLocalConfigConnector.fileContentsFromString(PROPERTY_FILE_NAME, APP_ID_PROPERTY)); assertTrue(connector.isInMatchingCloud()); assertEquals(APP_ID, connector.getApplicationInstanceInfo().getAppId()); } }