标签:案例 cto sse world 51cto main方法 import 方法 org
import org.junit.Test;
import static org.junit.Assert.*;
public class HelloWorldErrTest {
@Test
public void SayHello(){
HelloWorld helloWorld = new HelloWorld();
String restult = helloWorld.SayHello();
assertEquals("hello world123",restult);
}
}`
import org.junit.Test;
import static org.junit.Assert.*;
public class HelloWorldTest {
@Test
public void SayHello(){
HelloWorld helloWorld = new HelloWorld();
String restult = helloWorld.SayHello();
assertEquals("hello world",restult);
}
}`
Running com.wys.myapp.helloworld.HelloWorldTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.062 sec
Results :
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.225 s
[INFO] Finished at: 2018-08-02T14:29:58+08:00
[INFO] Final Memory: 16M/180M
[INFO] ------------------------------------------------------------------------
[D:\MavenTest\HelloWord]$
标签:案例 cto sse world 51cto main方法 import 方法 org
原文地址:http://blog.51cto.com/12074015/2331239