o test for embedder configuration validation

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@512556 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2007-02-28 01:45:55 +00:00
parent afc8c1ac11
commit fb6ffdc9de
1 changed files with 6 additions and 6 deletions

View File

@ -9,7 +9,7 @@ import java.io.File;
public class ValidateConfigurationTest
extends PlexusTestCase
{
public void testConfigurationOnlyUserSettingsAreActive()
public void testConfigurationOnlyUserSettingsAreActiveAndItIsValid()
{
File user = new File( getBasedir(), "src/test/resources/settings/valid-settings.xml" );
@ -23,17 +23,17 @@ public class ValidateConfigurationTest
assertTrue( result.isUserSettingsFileParses() );
}
public void testConfigurationOnlyGlobalSettingsAreActive()
public void testConfigurationOnlyGlobalSettingsAreActiveAndItIsValid()
{
File user = new File( getBasedir(), "src/test/resources/settings/valid-settings.xml" );
File global = new File( getBasedir(), "src/test/resources/settings/valid-settings.xml" );
Configuration configuration = new DefaultConfiguration()
.setUserSettingsFile( user );
.setUserSettingsFile( global );
ConfigurationValidationResult result = MavenEmbedder.validateConfiguration( configuration );
assertTrue( result.isUserSettingsFileParses() );
assertTrue( result.isGlobalSettingsFilePresent() );
assertTrue( result.isUserSettingsFileParses() );
assertTrue( result.isGlobalSettingsFileParses() );
}
}