Package org.junithelper.core.config

Examples of org.junithelper.core.config.Configuration


        assertEquals(expected, actual);
    }

    @Test
    public void toCompilableType_A$String$List$List$String() throws Exception {
        Configuration config = null;
        TypeNameConverter target = new TypeNameConverter(config);
        // given
        String packageName = null;
        String className = "List";
        List<String> generics = new ArrayList<String>();
View Full Code Here


   * @parameter
   */
  protected String extensionConfigXML = "junithelper-extension.xml";

  protected Configuration loadConfig() {
    Configuration config = new Configuration();
    config.language = language;
    config.outputFileEncoding = outputFileEncoding;
    config.directoryPathOfProductSourceCode = directoryPathOfProductSourceCode;
    config.directoryPathOfTestSourceCode = directoryPathOfTestSourceCode;
    try {
View Full Code Here

        assertNotNull(ArgTypeMetaExtractor.class);
    }

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

        assertNotNull(target);
    }

    @Test
    public void initialize_A$String() throws Exception {
        Configuration config = new Configuration();
        ArgTypeMetaExtractor target = new ArgTypeMetaExtractor(config);
        String sourceCodeString = "package hoge.foo; public class Sample { public Sample() {}\r\n public void doSomething(String str) { System.out.println(\"aaaa\") } }";
        target.initialize(sourceCodeString);
    }
View Full Code Here

        target.initialize(sourceCodeString);
    }

    @Test
    public void initialize_A$ClassMeta$String() throws Exception {
        Configuration config = new Configuration();
        ArgTypeMetaExtractor target = new ArgTypeMetaExtractor(config);
        String sourceCodeString = "package hoge.foo; public class Sample { public Sample() {}\r\n public void doSomething(String str) { System.out.println(\"aaaa\") } }";
        ClassMeta classMeta = new ClassMetaExtractor(config).extract(sourceCodeString);
        target.initialize(classMeta, sourceCodeString);
    }
View Full Code Here

        target.initialize(classMeta, sourceCodeString);
    }

    @Test
    public void doExtract_A$String() throws Exception {
        Configuration config = new Configuration();
        ArgTypeMetaExtractor target = new ArgTypeMetaExtractor(config);
        String sourceCodeString = "package hoge.foo; public class Sample { public Sample() {}\r\n public void doSomething(String str) { System.out.println(\"aaaa\") } }";
        target.initialize(sourceCodeString);
        String argsAreaString = "String str";
        target.doExtract(argsAreaString);
View Full Code Here

        assertEquals(target.getExtractedNameList().get(0), "str");
    }

    @Test
    public void initialize_A$ClassMeta() throws Exception {
        Configuration config = new Configuration();
        ArgTypeMetaExtractor target = new ArgTypeMetaExtractor(config);
        // given
        ClassMeta classMeta = mock(ClassMeta.class);
        // e.g. : given(mocked.called()).willReturn(1);
        // when
View Full Code Here

        assertThat(LineBreakProvider.class, notNullValue());
    }

    @Test
    public void instantiation() throws Exception {
        Configuration config = new Configuration();
        CurrentLineBreak currentLineBreak = CurrentLineBreak.CRLF;
        LineBreakProvider target = new LineBreakProvider(config, currentLineBreak);
        assertThat(target, notNullValue());
    }
View Full Code Here

        assertThat(target, notNullValue());
    }

    @Test
    public void getLineBreak_A$_FORCE_CRLF() throws Exception {
        Configuration config = new Configuration();
        config.lineBreakPolicy = LineBreakPolicy.forceCRLF;
        CurrentLineBreak currentLineBreak = CurrentLineBreak.LF;
        LineBreakProvider target = new LineBreakProvider(config, currentLineBreak);
        String actual = target.getLineBreak();
        String expected = "\r\n";
View Full Code Here

        assertThat(actual, is(equalTo(expected)));
    }

    @Test
    public void getLineBreak_A$_FORCE_LF() throws Exception {
        Configuration config = new Configuration();
        config.lineBreakPolicy = LineBreakPolicy.forceLF;
        CurrentLineBreak currentLineBreak = CurrentLineBreak.CRLF;
        LineBreakProvider target = new LineBreakProvider(config, currentLineBreak);
        String actual = target.getLineBreak();
        String expected = "\n";
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.