利用junit测试单个方法

Request req =org.junit.runner.Request.method(clazz,method);
new JUnitCore().run(req);

clazz是测试例类,method是测试例中的单个方法

posted @ 2016-04-27 08:31  挨踢民工~狂二小生  阅读(247)  评论(0编辑  收藏  举报