Package org.junithelper.core.config

Examples of org.junithelper.core.config.Configuration


        assertEquals(2, actual.size());
    }

    @Test
    public void extract_A$String_StringIsNull() throws Exception {
        Configuration config = new Configuration();
        ImportedListExtractor target = new ImportedListExtractor(config);
        String sourceCodeString = null;
        try {
            target.extract(sourceCodeString);
            fail();
View Full Code Here


        }
    }

    @Test
    public void extract_A$String_StringIsEmpty() throws Exception {
        Configuration config = new Configuration();
        ImportedListExtractor target = new ImportedListExtractor(config);
        String sourceCodeString = "";
        List<String> actual = target.extract(sourceCodeString);
        assertThat(actual, notNullValue());
    }
View Full Code Here

        assertNotNull(TestMethodGeneratorImpl.class);
    }

    @Test
    public void instantiation() throws Exception {
        Configuration config = null;
        TestMethodGeneratorImpl target = new TestMethodGeneratorImpl(config, lineBreakProvider);
        assertNotNull(target);
    }
View Full Code Here

    }

    @Test
    public void getTestMethodSourceCode_A$TestMethodMeta_ArrangeActAssert_JUnit3() throws Exception {
        // given
        Configuration config = new Configuration();
        config.junitVersion = JUnitVersion.version3;
        config.testingPatternExplicitComment = TestingPatternExplicitComment.ArrangeActAssert;
        TestMethodGeneratorImpl localGenerator = new TestMethodGeneratorImpl(config, lineBreakProvider);
        String sourceCodeString = "package hoge.foo; import java.util.List; public class Sample { public Sample() {}\r\n public int doSomething(String str, long longValue) throws Throwable { System.out.println(\"aaaa\") } }";
        ClassMeta targetClassMeta = classMetaExtractor.extract(sourceCodeString);
View Full Code Here

    }

    @Test
    public void getTestMethodSourceCode_A$TestMethodMeta_GivenWhenThen_JUnit3() throws Exception {
        // given
        Configuration config = new Configuration();
        config.junitVersion = JUnitVersion.version3;
        config.testingPatternExplicitComment = TestingPatternExplicitComment.GivenWhenThen;
        TestMethodGeneratorImpl localGenerator = new TestMethodGeneratorImpl(config, lineBreakProvider);
        String sourceCodeString = "package hoge.foo; import java.util.List; public class Sample { public Sample() {}\r\n public int doSomething(String str, long longValue) throws Throwable { System.out.println(\"aaaa\") } }";
        ClassMeta targetClassMeta = classMetaExtractor.extract(sourceCodeString);
View Full Code Here

    }

    @Test
    public void getTestMethodSourceCode_A$TestMethodMeta_JUnit3() throws Exception {
        // given
        Configuration config = new Configuration();
        config.junitVersion = JUnitVersion.version3;
        config.testingPatternExplicitComment = TestingPatternExplicitComment.GivenWhenThen;
        TestMethodGeneratorImpl localGenerator = new TestMethodGeneratorImpl(config, lineBreakProvider);
        String sourceCodeString = "package hoge.foo; import java.util.List; public class Sample { public Sample() {}\r\n public int doSomething(String str, long longValue) throws Throwable { System.out.println(\"aaaa\") } }";
        ClassMeta targetClassMeta = classMetaExtractor.extract(sourceCodeString);
View Full Code Here

    }

    @Test
    public void getTestMethodSourceCode_A$TestMethodMeta_ArrangeActAssert_JUnit4() throws Exception {
        // given
        Configuration config = new Configuration();
        config.testingPatternExplicitComment = TestingPatternExplicitComment.ArrangeActAssert;
        TestMethodGeneratorImpl localGenerator = new TestMethodGeneratorImpl(config, lineBreakProvider);
        String sourceCodeString = "package hoge.foo; import java.util.List; public class Sample { public Sample() {}\r\n public int doSomething(String str, long longValue) throws Throwable { System.out.println(\"aaaa\") } }";
        ClassMeta targetClassMeta = classMetaExtractor.extract(sourceCodeString);
        localGenerator.initialize(targetClassMeta);
View Full Code Here

    }

    @Test
    public void getTestMethodSourceCode_A$TestMethodMeta_GivenWhenThen_JUnit4() throws Exception {
        // given
        Configuration config = new Configuration();
        config.testingPatternExplicitComment = TestingPatternExplicitComment.GivenWhenThen;
        TestMethodGeneratorImpl localGenerator = new TestMethodGeneratorImpl(config, lineBreakProvider);
        String sourceCodeString = "package hoge.foo; import java.util.List; public class Sample { public Sample() {}\r\n public int doSomething(String str, long longValue) throws Throwable { System.out.println(\"aaaa\") } }";
        ClassMeta targetClassMeta = classMetaExtractor.extract(sourceCodeString);
        localGenerator.initialize(targetClassMeta);
View Full Code Here

        assertEquals("", buf.toString());
    }

    @Test
    public void appendMockChecking_A$StringBuilder$int_EasyMock() throws Exception {
        Configuration config = new Configuration();
        config.mockObjectFramework = MockObjectFramework.EasyMock;
        TestMethodGeneratorImpl target = new TestMethodGeneratorImpl(config, lineBreakProvider);
        // given
        StringBuilder buf = new StringBuilder();
        int depth = 2;
View Full Code Here

                .toString());
    }

    @Test
    public void appendMockChecking_A$StringBuilder$int_JMock2() throws Exception {
        Configuration config = new Configuration();
        config.mockObjectFramework = MockObjectFramework.JMock2;
        TestMethodGeneratorImpl target = new TestMethodGeneratorImpl(config, lineBreakProvider);
        // given
        StringBuilder buf = new StringBuilder();
        int depth = 2;
View Full Code Here

TOP

Related Classes of org.junithelper.core.config.Configuration

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.