@SuppressWarnings( "unchecked" )
@Test
public void test()
{
TestCompilerMojo c = new TestCompilerMojo()
{
@Override
public Set<Artifact> getDependencies()
{
return flexArtifacts;
}
@Override
public Artifact resolve( String groupId, String artifactId, String version, String classifier,
String type )
{
return createArtifact( groupId, artifactId, version, null, type, classifier );
}
@Override
public File getOutputDirectory()
{
return new File( "target/temp" );
}
};
c.setLog( mock( Log.class ) );
c.toolsLocale = "en_US";
List<File> deps = Arrays.asList( c.getExternalLibraryPath() );
MatcherAssert.assertThat( deps, CollectionsMatcher.isSize( 1 ) );
MatcherAssert.assertThat( deps, hasItems( withAbsolutePath( containsString( "playerglobal.swc" ) ) ) );
deps = Arrays.asList( c.getIncludeLibraries() );
MatcherAssert.assertThat( deps, CollectionsMatcher.isSize( 6 ) );
MatcherAssert.assertThat( deps, hasItems( withAbsolutePath( containsString( "framework-internal" ) ),//
withAbsolutePath( containsString( "rpc-internal" ) ),//
withAbsolutePath( containsString( "flexunit" ) ),//
withAbsolutePath( containsString( "flexmojos-unittest-flexunit4" ) ),//
withAbsolutePath( containsString( "flexmojos-unittest-support" ) ),//
withAbsolutePath( containsString( "rpc-test" ) ) ) );
deps = Arrays.asList( c.getLibraryPath() );
MatcherAssert.assertThat( deps, CollectionsMatcher.isSize( 8 ) );
MatcherAssert.assertThat( deps, hasItems( withAbsolutePath( containsString( "framework-external" ) ),//
withAbsolutePath( containsString( "rpc-external" ) ),//
withAbsolutePath( containsString( "framework-merged" ) ),//
withAbsolutePath( containsString( "rpc-merged" ) ),//