JUnit 3和JUnit 4之间的区别 [英] The differences between JUnit 3 and JUnit 4

查看:131
本文介绍了JUnit 3和JUnit 4之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以用几句话描述一下JUnit 3和4之间的主要区别是什么吗?

Could someone describe in a few words what the main differences between JUnit 3 and 4 are?

推荐答案

  1. 用于设置和拆卸的Java 5注释(@before@after) 而不是setUp()tearDown().

不再需要扩展TestCase.

don't need to extend TestCase anymore.

@Test注释替换了testSomeMethod()命名约定.

@Test annotation replaces testSomeMethod() naming convention.

static imports用于断言.

Junit理论,可让您从测试中分离数据集 本身.

Junit theories, which allow you to separate data sets from the test itself.

这篇关于JUnit 3和JUnit 4之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆