Myeclipse中如何进行JUnit单元测试?(2)
发表于:2016-10-28来源:冷血之心的博客作者:冷血之心点击数:
标签:MyEclipse
Test1 { public static void main ( String[] args ) {} // 方法1 public static void addNum ( int a, int b ) {System. out .println(a + b);} // 方法2 public static void method2 () {System. out .println
Test1 {
public static void main(String[] args) {
}
public static void addNum(int a, int b) {
System.
out.println(a + b);
}
public static void method2() {
System.
out.println(
"这是方法2.。。");
}
public static void method3() {
System.
out.println(
"这是方法3.。。");
}
public static void method4() {
System.
out.println(
"这是方法4.。。");
}
}
Test_juint.java
package com.ywq1;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
public class Test_juint {
@Test
public void
原文转自:http://blog.csdn.net/qq_25827845/article/details/52132596