Package org.junithelper.core.config

Examples of org.junithelper.core.config.Configuration


                buf.toString());
    }

    @Test
    public void appendMockChecking_A$StringBuilder$int_JMockit() throws Exception {
        Configuration config = new Configuration();
        config.mockObjectFramework = MockObjectFramework.JMockit;
        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_Mockito() throws Exception {
        Configuration config = new Configuration();
        config.mockObjectFramework = MockObjectFramework.Mockito;
        TestMethodGeneratorImpl target = new TestMethodGeneratorImpl(config, lineBreakProvider);
        // given
        StringBuilder buf = new StringBuilder();
        int depth = 2;
View Full Code Here

    }

    @Test
    public void getArgValue_A$TestMethodMeta$ArgTypeMeta$String_Mockito() throws Exception {
        // given
        Configuration config = new Configuration();
        config.mockObjectFramework = MockObjectFramework.Mockito;
        TestMethodGeneratorImpl target = new TestMethodGeneratorImpl(config, lineBreakProvider);
        ClassMetaExtractor classMetaExtractor = new ClassMetaExtractor(config);
        String sourceCodeString = "package hoge.foo; import java.util.List; import java.util.Map; public class Sample { public int doSomething(String str, long longValue, List<String> list, Map<String,Object> map, java.util.HashMap<String, String> hashMap) throws Throwable { System.out.println(\"aaaa\") } }";
        ClassMeta targetClassMeta = classMetaExtractor.extract(sourceCodeString);
View Full Code Here

    }

    @Test
    public void getArgValue_A$TestMethodMeta$ArgTypeMeta$String_EasyMock() throws Exception {
        // given
        Configuration config = new Configuration();
        config.mockObjectFramework = MockObjectFramework.EasyMock;
        TestMethodGeneratorImpl target = new TestMethodGeneratorImpl(config, lineBreakProvider);
        ClassMetaExtractor classMetaExtractor = new ClassMetaExtractor(config);
        String sourceCodeString = "package hoge.foo; import java.util.List; import java.util.Map; public class Sample { public int doSomething(String str, long longValue, List<String> list, Map<String,Object> map, java.util.HashMap<String, String> hashMap) throws Throwable { System.out.println(\"aaaa\") } }";
        ClassMeta targetClassMeta = classMetaExtractor.extract(sourceCodeString);
View Full Code Here

    }

    @Test
    public void getArgValue_A$TestMethodMeta$ArgTypeMeta$String_JMock2() throws Exception {
        // given
        Configuration config = new Configuration();
        config.mockObjectFramework = MockObjectFramework.JMock2;
        TestMethodGeneratorImpl target = new TestMethodGeneratorImpl(config, lineBreakProvider);
        ClassMetaExtractor classMetaExtractor = new ClassMetaExtractor(config);
        String sourceCodeString = "package hoge.foo; import java.util.List; import java.util.Map; public class Sample { public int doSomething(String str, long longValue, List<String> list, Map<String,Object> map, java.util.HashMap<String, String> hashMap) throws Throwable { System.out.println(\"aaaa\") } }";
        ClassMeta targetClassMeta = classMetaExtractor.extract(sourceCodeString);
View Full Code Here

    }

    @Test
    public void getArgValue_A$TestMethodMeta$ArgTypeMeta$String_JMockit() throws Exception {
        // given
        Configuration config = new Configuration();
        config.mockObjectFramework = MockObjectFramework.JMockit;
        TestMethodGeneratorImpl target = new TestMethodGeneratorImpl(config, lineBreakProvider);
        ClassMetaExtractor classMetaExtractor = new ClassMetaExtractor(config);
        String sourceCodeString = "package hoge.foo; import java.util.List; import java.util.Map; public class Sample { public int doSomething(String str, long longValue, List<String> list, Map<String,Object> map, java.util.HashMap<String, String> hashMap) throws Throwable { System.out.println(\"aaaa\") } }";
        ClassMeta targetClassMeta = classMetaExtractor.extract(sourceCodeString);
View Full Code Here

    }

    @Test
    public void appendTestingPatternExplicitComment_A$StringBuilder$String$int_ArrangeActAssert() throws Exception {
        // Arrange
        Configuration config = new Configuration();
        config.testingPatternExplicitComment = TestingPatternExplicitComment.ArrangeActAssert;
        TestMethodGeneratorImpl target = new TestMethodGeneratorImpl(config, lineBreakProvider);
        StringBuilder buf = new StringBuilder();
        String value = "Act";
        int depth = 0;
View Full Code Here

    }

    @Test
    public void appendTestingPatternExplicitComment_A$StringBuilder$String$int_GivenWhenThen() throws Exception {
        // Arrange
        Configuration config = new Configuration();
        config.testingPatternExplicitComment = TestingPatternExplicitComment.GivenWhenThen;
        TestMethodGeneratorImpl target = new TestMethodGeneratorImpl(config, lineBreakProvider);
        StringBuilder buf = new StringBuilder();
        String value = "Act";
        int depth = 0;
View Full Code Here

        assertNotNull(MethodMetaExtractor.class);
    }

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

  @Override
  public String getUnifiedVersionTestCaseSourceCode(String currentTestCaseSourceCode, JUnitVersion version) {
    String dest = currentTestCaseSourceCode;
    ClassMeta classMeta = new ClassMetaExtractor(config).extract(currentTestCaseSourceCode);
    Configuration config = ObjectUtil.deepCopy(this.config);
    if (version == JUnitVersion.version3) {
      dest = dest.replaceAll("@Test[\\s\r\n]*public void ", "public void test"
          + config.testMethodName.basicDelimiter);
      String[] splittedArray = config.testCaseClassNameToExtend.split("\\.");
      String testCaseName = splittedArray[splittedArray.length - 1];
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.