@Test public void testBuildPropertyInvalid() throws Exception { List<InputStream> testResourceStreams = new LinkedList<>(); testResourceStreams.add( new ByteArrayInputStream(getKeyValue(BuildProperties.BUILD_NAME_PROP, "sample").getBytes())); doReturn(testResourceStreams).when(mockResourceRetriever).getResources(any(), anyString()); List<BuildProperties> result = buildPropertiesReader.getAllBuildProperties(); Assert.assertEquals(result.size(), 1); Assert.assertFalse(result.get(0).isValid()); }
public List<BuildProperties> getAllBuildProperties() { readAllBuildProperties(); return allBuildProperties; }
BuildPropertiesReader { public List<BuildProperties> getAllBuildProperties() { readAllBuildProperties(); return allBuildProperties; } }
BuildPropertiesReader { public List<BuildProperties> getAllBuildProperties() { readAllBuildProperties(); return allBuildProperties; } BuildPropertiesReader(String buildPropertiesFile); }
BuildPropertiesReader { public List<BuildProperties> getAllBuildProperties() { readAllBuildProperties(); return allBuildProperties; } BuildPropertiesReader(String buildPropertiesFile); BuildProperties getFirstServiceBuildProperties(); List<BuildProperties> getNonServiceBuildProperties(); List<BuildProperties> getAllBuildProperties(); void setResourceRetriever(ResourceRetriever resourcesRetriever); }
BuildPropertiesReader { public List<BuildProperties> getAllBuildProperties() { readAllBuildProperties(); return allBuildProperties; } BuildPropertiesReader(String buildPropertiesFile); BuildProperties getFirstServiceBuildProperties(); List<BuildProperties> getNonServiceBuildProperties(); List<BuildProperties> getAllBuildProperties(); void setResourceRetriever(ResourceRetriever resourcesRetriever);  }