Package junit.framework

Examples of junit.framework.JUnit4TestAdapter


    assertEquals("MB51", t.get(0).getId());
    assertEquals("MB110", t.get(t.size()-1).getId());
  }

  public static junit.framework.Test suite() {
    return new JUnit4TestAdapter(TrecTopicSetTest.class);
  }
View Full Code Here


        fValue1 = 2;
        fValue2 = 3;
    }

    public static junit.framework.Test suite() {
        return new JUnit4TestAdapter(SimpleTest.class);
    }
View Full Code Here

    private JUnit4TestAdapter fAdapter;

    @Before
    public void createAdapter() {
        fAdapter = new JUnit4TestAdapter(
                CantInitializeTests.class);
    }
View Full Code Here

    private IMoney fMB1;
    private IMoney fMB2;

    public static junit.framework.Test suite() {
        return new JUnit4TestAdapter(MoneyTest.class);
    }
View Full Code Here

        }
    }

    public void testInvalidMethod() {
        TestResult result = new TestResult();
        junit.framework.Test adapter = new JUnit4TestAdapter(InvalidMethodTest.class);
        adapter.run(result);
        assertEquals(1, result.errorCount());
        TestFailure failure = result.errors().nextElement();
        assertTrue(failure.exceptionMessage().contains("Method shouldBeStatic() should be static"));
    }
View Full Code Here

    }

    public void testRunWithClass() {
        wasRun = false;
        TestResult result = new TestResult();
        junit.framework.Test adapter = new JUnit4TestAdapter(NoTests.class);
        adapter.run(result);
        assertTrue(wasRun);
    }
View Full Code Here

        List<Throwable> problems = validateAllMethods(fClass);
        assertEquals(fErrorCount, problems.size());
    }

    public static junit.framework.Test suite() {
        return new JUnit4TestAdapter(ParameterizedTestMethodTest.class);
    }
View Full Code Here

        adapter.run(result);
        assertTrue(wasRun);
    }

    public void testToStringSuite() {
        junit.framework.Test adapter = new JUnit4TestAdapter(NoTests.class);
        assertEquals(NoTests.class.getName(), adapter.toString());
    }
View Full Code Here

            public void c() {
                log += "c";
            }

            public static junit.framework.Test suite() {
                return new JUnit4TestAdapter(SortMe.class);
            }
View Full Code Here

    }

    @Test
    public void compatibility() {
        TestResult result = new TestResult();
        new JUnit4TestAdapter(InfiniteLoopTest.class).run(result);
        assertEquals(1, result.errorCount());
    }
View Full Code Here

TOP

Related Classes of junit.framework.JUnit4TestAdapter

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.