AfterTestTearDownStatementTest.java 文件源码

java
阅读 12 收藏 0 点赞 0 评论 0

项目:unitils 作者:
/**
 * Test method for {@link org.unitils.core.junit.AfterTestTearDownStatement#evaluate()}.
 */
@Test(expected = NullPointerException.class)
public void testEvaluateStatementException() throws Throwable {
    TestClass2 testObject = new TestClass2();
    Method testMethod = TestClass2.class.getMethod("test1");

    statement.evaluate();
    EasyMock.expectLastCall().andThrow(new NullPointerException());
    listener.afterTestTearDown(testObject, testMethod);

    EasyMockUnitils.replay();
    new AfterTestTearDownStatement(listener, statement, testObject, testMethod).evaluate();

}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号