Java Code Examples for vogar.target.mixture.junit4.AbstractJUnit4Test

Following code examples demonstrate how to use vogar.target.mixture.junit4.AbstractJUnit4Testfrom android. These examples are extracted from various highly rated open source projects. You can directly use these code snippets or view their entire linked source code. These snippets are extracted to provide contextual information about how to use this class in the real world. These samples also let you understand some good practices on how to use vogar.target.mixture.junit4.AbstractJUnit4Testand various code implementation of this class.

    public void testRunner_Mixture() throws Exception {
        TestRunner runner = testRunnerRule.createTestRunner();
        runner.run();

        String notPublicClassOrConstructorTest
                = "vogar.target.mixture.junit3.NotPublicClassOrConstructorTest";
        String notPublicClassTest
                = "vogar.target.mixture.junit3.NotPublicClassTest";
        expectedResults()
                .forTestClass(NonTestClass.class)
                .unsupported()
                .forTestClass(AbstractJUnit3Test.class)
                .unsupported()
                .forTestClass(JUnit3Test.class)
                .success("testFoo")
                .forTestClass(notPublicClassOrConstructorTest)
                .failure("test1",
                        "junit.framework.AssertionFailedError: Class "
                                + notPublicClassOrConstructorTest
                                + " has no public constructor TestCase(String name) or TestCase()\n")
                .failure("test2",
                        "junit.framework.AssertionFailedError: Class "
                                + notPublicClassOrConstructorTest
                                + " has no public constructor TestCase(String name) or TestCase()\n")
                .forTestClass(notPublicClassTest)
                .failure("test1",
                        "junit.framework.AssertionFailedError: Class "
                                + notPublicClassTest + " is not public\n")
                .failure("test2",
                        "junit.framework.AssertionFailedError: Class "
                                + notPublicClassTest + " is not public\n")
                .forTestClass(NotPublicConstructorTest.class)
                .failure("test1",
                        "junit.framework.AssertionFailedError: Class "
                                + NotPublicConstructorTest.class.getName()
                                + " has no public constructor TestCase(String name) or TestCase()\n")
                .failure("test2",
                        "junit.framework.AssertionFailedError: Class "
                                + NotPublicConstructorTest.class.getName()
                                + " has no public constructor TestCase(String name) or TestCase()\n")
                .forTestClass(TwoConstructorsTest.class)
                .success("test")
                .forTestClass(AbstractJUnit4Test.class)
                .unsupported()
                .forTestClass(JUnit4Test.class)
                .success("testBar")
                .success("testBaz")
                .forTestClass(MainApp.class)
                .success("main", "Main\n")
                .completedNormally();
    } 


Advertisement
Related Classes
Advertisement