Package fi.jumi.actors.maven.codegen

Examples of fi.jumi.actors.maven.codegen.GeneratedClass


    @Test
    public void adds_imports_for_all_method_parameter_types() {
        generator = new EventStubGenerator(ExternalLibraryReferencingListener.class, targetPackageResolver);

        GeneratedClass event = generator.getEvents().get(0);
        assertThat(event.source, containsString("import java.util.Random;"));

        GeneratedClass frontend = generator.getFrontend();
        assertThat(frontend.source, containsString("import java.util.Random;"));
    }
View Full Code Here


    @Test
    public void adds_imports_for_type_parameters_of_method_parameter_types() {
        generator = new EventStubGenerator(GenericParametersListener.class, targetPackageResolver);

        GeneratedClass event = generator.getEvents().get(0);
        assertThat(event.source, containsString("import java.util.List;"));
        assertThat(event.source, containsString("import java.io.File;"));

        GeneratedClass frontend = generator.getFrontend();
        assertThat(frontend.source, containsString("import java.util.List;"));
        assertThat(frontend.source, containsString("import java.io.File;"));
    }
View Full Code Here

    @Test
    public void raw_types_are_not_used() {
        generator = new EventStubGenerator(GenericParametersListener.class, targetPackageResolver);

        GeneratedClass event = generator.getEvents().get(0);
        assertThat(event.source, containsString("List<File>"));
        assertThat(event.source, not(containsString("List ")));

        GeneratedClass frontend = generator.getFrontend();
        assertThat(frontend.source, containsString("List<File>"));
        assertThat(frontend.source, not(containsString("List ")));
    }
View Full Code Here

    @Test
    public void supports_methods_inherited_from_parent_interfaces() {
        generator = new EventStubGenerator(ChildInterface.class, targetPackageResolver);

        GeneratedClass frontend = generator.getFrontend();
        assertThat(frontend.source, containsString("void methodInChild()"));
        assertThat(frontend.source, containsString("void methodInParent()"));
    }
View Full Code Here

TOP

Related Classes of fi.jumi.actors.maven.codegen.GeneratedClass

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.