Package org.junithelper.core.config

Examples of org.junithelper.core.config.Configuration


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

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


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

    @Test
    public void getLineBreak_A$_CRLF_NEW_FILE_ONLY_2() throws Exception {
        Configuration config = new Configuration();
        config.lineBreakPolicy = LineBreakPolicy.forceNewFileCRLF;
        CurrentLineBreak currentLineBreak = null;
        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$_LF_NEW_FILE_ONLY_1() throws Exception {
        Configuration config = new Configuration();
        config.lineBreakPolicy = LineBreakPolicy.forceNewFileLF;
        CurrentLineBreak currentLineBreak = CurrentLineBreak.CRLF;
        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$_LF_NEW_FILE_ONLY_2() throws Exception {
        Configuration config = new Configuration();
        config.lineBreakPolicy = LineBreakPolicy.forceNewFileLF;
        CurrentLineBreak currentLineBreak = null;
        LineBreakProvider target = new LineBreakProvider(config, currentLineBreak);
        String actual = target.getLineBreak();
        String expected = "\n";
View Full Code Here

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

    @Test(expected = JUnitHelperCoreException.class)
    public void getInstantiationSourceCode_A$Configuration$SourceCodeAppender$TestMethodMeta_Null() throws Exception {
        Configuration config = null;
        TestMethodMeta testMethodMeta = null;
        GeneratorImplFunction.getInstantiationSourceCode(config, appender, testMethodMeta);
    }
View Full Code Here

        GeneratorImplFunction.getInstantiationSourceCode(config, appender, testMethodMeta);
    }

    @Test
    public void getInstantiationSourceCode_A$Configuration$SourceCodeAppender$TestMethodMeta() throws Exception {
        Configuration config = new Configuration();
        config.isExtensionEnabled = true;
        config.extConfiguration = new ExtConfiguration(config);
        ExtInstantiation ins = new ExtInstantiation("com.example.Bean");
        ins.importList.add("com.example.BeanFactory");
        ins.assignCode = "BeanFactory.getInstance()";
View Full Code Here

    }

    @Test
    public void getInstantiationSourceCode_A$Configuration$SourceCodeAppender$TestMethodMeta_WithSemicolon()
            throws Exception {
        Configuration config = new Configuration();
        config.isExtensionEnabled = true;
        config.extConfiguration = new ExtConfiguration(config);
        ExtInstantiation ins = new ExtInstantiation("com.example.Bean");
        ins.importList.add("com.example.BeanFactory");
        ins.assignCode = "BeanFactory.getInstance();";
View Full Code Here

    }

    @Test
    public void getInstantiationSourceCode_A$Configuration$SourceCodeAppender$TestMethodMeta_TargetByExtInstantiation()
            throws Exception {
        Configuration config = new Configuration();
        config.isExtensionEnabled = true;
        config.extConfiguration = new ExtConfiguration(config);
        ExtInstantiation ins = new ExtInstantiation("com.example.Bean");
        ins.importList.add("com.example.BeanFactory");
        ins.assignCode = "BeanFactory.getInstance()";
View Full Code Here

    }

    @Test
    public void getInstantiationSourceCode_A$Configuration$SourceCodeAppender$TestMethodMeta_TargetByExtInstantiation_WithSemicolon()
            throws Exception {
        Configuration config = new Configuration();
        config.isExtensionEnabled = true;
        config.extConfiguration = new ExtConfiguration(config);
        ExtInstantiation ins = new ExtInstantiation("com.example.Bean");
        ins.importList.add("com.example.BeanFactory");
        ins.assignCode = "BeanFactory.getInstance();";
View Full Code Here

    public void isAvailableType_A$String$Configuration_true() throws Exception {
        ClassMeta classMeta = new ClassMeta();
        AvailableTypeDetector target = new AvailableTypeDetector(classMeta);
        // given
        String typeName = "String";
        Configuration config = new Configuration();
        // when
        boolean actual = target.isAvailableType(typeName, config);
        // then
        boolean expected = true;
        assertEquals(expected, actual);
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.