@Test public void testParseDirectory_conflictingIds() throws Exception { File dir = this.folder.newFolder(); Utils.writeStringInto( "id: tid\nhandler: in\nname: na", new File( dir, "t1.properties" )); Utils.writeStringInto( "id: tid\nhandler: in\nname: na", new File( dir, "t2.properties" )); List<ModelError> errors = TargetValidator.parseDirectory( dir ); Assert.assertEquals( 1, errors.size()); Assert.assertEquals( ErrorCode.REC_TARGET_CONFLICTING_ID, errors.get( 0 ).getErrorCode()); }
public static List<ModelError> parseDirectory( File directory ) { return parseDirectory( directory, null ); }
TargetValidator { public static List<ModelError> parseDirectory( File directory ) { return parseDirectory( directory, null ); } }
TargetValidator { public static List<ModelError> parseDirectory( File directory ) { return parseDirectory( directory, null ); } TargetValidator( String propertiesFileContent );  TargetValidator( File propertiesFile );  TargetValidator( File propertiesFile, Object modelObject ); }
TargetValidator { public static List<ModelError> parseDirectory( File directory ) { return parseDirectory( directory, null ); } TargetValidator( String propertiesFileContent );  TargetValidator( File propertiesFile );  TargetValidator( File propertiesFile, Object modelObject ); void validate(); List<ModelError> getErrors(); Properties getProperties(); static List<ModelError> parseDirectory( File directory ); static List<ModelError> parseDirectory( File directory, Component c ); static List<ModelError> parseTargetProperties( File projectDirectory, Component c ); }
TargetValidator { public static List<ModelError> parseDirectory( File directory ) { return parseDirectory( directory, null ); } TargetValidator( String propertiesFileContent );  TargetValidator( File propertiesFile );  TargetValidator( File propertiesFile, Object modelObject ); void validate(); List<ModelError> getErrors(); Properties getProperties(); static List<ModelError> parseDirectory( File directory ); static List<ModelError> parseDirectory( File directory, Component c ); static List<ModelError> parseTargetProperties( File projectDirectory, Component c );  }