标签:learn asserts ram 结束 套件 静态内部类 eth 学习笔记 res
1. StartUp
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
import org.junit.Assert;
import org.junit.Test;
public class AssertTest {
@Test
public void testAssertEquals(){
Assert.assertEquals("HelloJUnit", "HelloJUnit");
Assert.assertNotEquals("HelloWorld", "HelloJUnit");
}
}
2. 常用Assert方法
Assert.assertEquals, Assert.assertNotEquals
Assert.assertSame, Assert.assertNotSame
Assert.assertTrue, Assert.assertFalse
Assert.assertNull, Assert.assertNotNull
Assert.assertThat
Assert.assertArrayEqauls
Assert.fail
Aassume.assumeTrue
Aassume.assumeFalse
Aassume.assumeNotNull
Aassume.assumeThat
Aassume.assumeNoException
标签:learn asserts ram 结束 套件 静态内部类 eth 学习笔记 res
原文地址:http://www.cnblogs.com/qianmin/p/6049409.html