单元测试新方法:用setUp方法 @Before注释

Posted 武红明

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了单元测试新方法:用setUp方法 @Before注释相关的知识,希望对你有一定的参考价值。

public class CentralizedPUDMatchServicePacTest {
PacMatchService pacMatchService;

@Before
public void setUp(){
pacMatchService = SpringTestHelper.get().getBean(PacMatchService.class);
}



@Test
public void testPacMatch(){

String pacAddress = "江苏省南京市玄武区珠江路435号";
DipanMatchBizAreaMatchMultiResponse response = pacMatchService.diPanMatch(pacAddress, "0000001");
// Assert.assertEquals(result.get(Constants.MATCHWAY),Constants.MATCHWAY_RANGE);
}

}

以上是关于单元测试新方法:用setUp方法 @Before注释的主要内容,如果未能解决你的问题,请参考以下文章