Package net.flexmojos.oss.plugin.test

Examples of net.flexmojos.oss.plugin.test.TestCompilerMojo


    @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" ) ),//
View Full Code Here

TOP

Related Classes of net.flexmojos.oss.plugin.test.TestCompilerMojo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.