Examples of JunitTestTreeAdapter


Examples of ar.com.dgarcia.javaspec.impl.junit.JunitTestTreeAdapter

    @Test
    public void itNamesTheRootGroupAfterTheTestClass(){
        Class<? extends JavaSpec> specClass = EmptySpec.class;
        SpecTree specTree = SpecParser.create().parse(specClass);

        JunitTestTreeAdapter adapter = JunitTestTreeAdapter.create(specTree, specClass);
        assertThat(adapter.getJunitTree().getJunitDescription().getDisplayName()).isEqualTo(specClass.getName());
    }
View Full Code Here

Examples of ar.com.dgarcia.javaspec.impl.junit.JunitTestTreeAdapter

    @Test
    public void itCreatesAnInnerGroupPerDescribe(){
        Class<? extends JavaSpec> specClass = OneEmptyDescribeSpec.class;
        SpecTree specTree = SpecParser.create().parse(specClass);

        JunitTestTreeAdapter adapter = JunitTestTreeAdapter.create(specTree, specClass);
        Description onlySubGroup = adapter.getJunitTree().getJunitDescription().getChildren().get(0);
        assertThat(onlySubGroup.getDisplayName()).isEqualTo("empty describe");

    }
View Full Code Here

Examples of ar.com.dgarcia.javaspec.impl.junit.JunitTestTreeAdapter

    @Test
    public void itCreatesATestPerSpecTest(){
        Class<? extends JavaSpec> specClass = OneRootTestSpecTest.class;
        SpecTree specTree = SpecParser.create().parse(specClass);

        JunitTestTreeAdapter adapter = JunitTestTreeAdapter.create(specTree, specClass);
        List<JunitTestCode> junitTests = adapter.getJunitTree().getJunitTests();
        assertThat(junitTests).hasSize(1);
        assertThat(junitTests.get(0).getTestDescription().getDisplayName()).isEqualTo("only test");

    }
View Full Code Here

Examples of ar.com.dgarcia.javaspec.impl.junit.JunitTestTreeAdapter

    @Test
    public void itNamesTheRootGroupAfterTheTestClass(){
        Class<? extends JavaSpec> specClass = EmptySpec.class;
        SpecTree specTree = SpecParser.create().parse(specClass);

        JunitTestTreeAdapter adapter = JunitTestTreeAdapter.create(specTree, specClass);
        assertThat(adapter.getJunitTree().getJunitDescription().getDisplayName()).isEqualTo(specClass.getName());
    }
View Full Code Here

Examples of ar.com.dgarcia.javaspec.impl.junit.JunitTestTreeAdapter

    @Test
    public void itCreatesAnInnerGroupPerDescribe(){
        Class<? extends JavaSpec> specClass = OneEmptyDescribeSpec.class;
        SpecTree specTree = SpecParser.create().parse(specClass);

        JunitTestTreeAdapter adapter = JunitTestTreeAdapter.create(specTree, specClass);
        Description onlySubGroup = adapter.getJunitTree().getJunitDescription().getChildren().get(0);
        assertThat(onlySubGroup.getDisplayName()).isEqualTo("empty describe");

    }
View Full Code Here

Examples of ar.com.dgarcia.javaspec.impl.junit.JunitTestTreeAdapter

    @Test
    public void itCreatesATestPerSpecTest(){
        Class<? extends JavaSpec> specClass = OneRootTestSpec.class;
        SpecTree specTree = SpecParser.create().parse(specClass);

        JunitTestTreeAdapter adapter = JunitTestTreeAdapter.create(specTree, specClass);
        List<JunitTestCode> junitTests = adapter.getJunitTree().getJunitTests();
        assertThat(junitTests).hasSize(1);
        assertThat(junitTests.get(0).getTestDescription().getDisplayName()).isEqualTo("only test");

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.