}
public void testDefaultPropertiesIncludeOrganization()
{
final Organization organization = new Organization();
organization.setName( "Example Organization" );
organization.setUrl( "http://example.org" );
// MavenProjectStub.setOrganization(Organization) doesn't do anything, so we have to make it work this way
MavenProject project = new MavenProjectStub()
{
@Override
public Organization getOrganization()
{
return organization;
}
};
project.setGroupId( "group" );
project.setArtifactId( "project" );
project.setVersion( "1.2.3.4" );
Properties properties = plugin.getDefaultProperties( project );
assertEquals( organization.getName(), properties.getProperty( "project.organization.name" ) );
assertEquals( organization.getName(), properties.getProperty( "pom.organization.name" ) );
assertEquals( organization.getUrl(), properties.getProperty( "project.organization.url" ) );
assertEquals( organization.getUrl(), properties.getProperty( "pom.organization.url" ) );
}