@Test
public void validateProject() throws Exception {

	// Basic validation from a new project
	File dir = this.folder.newFolder();
	CreationBean bean = new CreationBean()
						.projectDescription( "some desc" ).projectName( "my-project" )
						.groupId( "net.roboconf" ).projectVersion( "1.0-SNAPSHOT" ).mavenProject( false );
	ProjectUtils.createProjectSkeleton( dir, bean );
	ProjectValidationResult result = ProjectValidator.validateProject( dir );
	Assert.assertNotNull( result.getRawParsingResult());
	List<RoboconfError> errors = result.getErrors();
	Assert.assertEquals( 2, errors.size());
	for( RoboconfError roboconfError : errors )
		Assert.assertEquals( ErrorCode.PROJ_NO_RESOURCE_DIRECTORY, roboconfError.getErrorCode());
	// Now, add an invalid graph file
	File invalidGraphFile = new File( dir, Constants.PROJECT_DIR_GRAPH + "/invalid" + Constants.FILE_EXT_GRAPH );
	Utils.writeStringInto( "comp {\n\tinst: script;\n}\n", invalidGraphFile );
	File invalidInstanceFile = new File( dir, Constants.PROJECT_DIR_INSTANCES + "/invalid" + Constants.FILE_EXT_INSTANCES );
	Utils.writeStringInto( "instance of inexisting {\n\tname: toto;\n}\n", invalidInstanceFile );
	errors = ProjectValidator.validateProject( dir ).getErrors();
	Assert.assertEquals( 6, errors.size());
	Assert.assertEquals( ErrorCode.PM_PROPERTY_NOT_APPLIABLE, errors.get( 0 ).getErrorCode());
	Assert.assertEquals( ErrorCode.CO_INEXISTING_COMPONENT, errors.get( 1 ).getErrorCode());
	Assert.assertEquals( ErrorCode.PROJ_NO_RESOURCE_DIRECTORY, errors.get( 2 ).getErrorCode());
	Assert.assertEquals( ErrorCode.PROJ_NO_RESOURCE_DIRECTORY, errors.get( 3 ).getErrorCode());
	Assert.assertEquals( ErrorCode.PROJ_UNREACHABLE_FILE, errors.get( 4 ).getErrorCode());
	Assert.assertEquals( ErrorCode.PROJ_UNREACHABLE_FILE, errors.get( 5 ).getErrorCode());
	List<File> unreachableFiles = new ArrayList<> ();
	unreachableFiles.add(((ParsingError) errors.get( 4 )).getFile());
	unreachableFiles.add(((ParsingError) errors.get( 5 )).getFile());
	Assert.assertTrue( unreachableFiles.contains( invalidInstanceFile ));
	Assert.assertTrue( unreachableFiles.contains( invalidGraphFile ));
	// Verify these errors are not ALL found when we load the application
	errors = new ArrayList<>( RuntimeModelIo.loadApplication( dir ).getLoadErrors());
	Assert.assertEquals( 4, errors.size());
	Assert.assertEquals( ErrorCode.PROJ_NO_RESOURCE_DIRECTORY, errors.get( 0 ).getErrorCode());
	Assert.assertEquals( ErrorCode.PROJ_NO_RESOURCE_DIRECTORY, errors.get( 1 ).getErrorCode());
	Assert.assertEquals( ErrorCode.PROJ_UNREACHABLE_FILE, errors.get( 2 ).getErrorCode());
	Assert.assertEquals( ErrorCode.PROJ_UNREACHABLE_FILE, errors.get( 3 ).getErrorCode());
}