Junit4

package test.code;

import static org.junit.Assert.*;

import org.junit.Test;

import code.MyCode;

public class Test2 {    
    MyCode mc = new MyCode();
    @Test
    public void testM1() {
        assertEquals(10086, mc.m1());
    }
    
    @Test
    public void testM2() {
        assertNull(mc.m2());
    }
    
    @Test
    public void testM3() {
        assertTrue(mc.m3());
    }
    
    @Test
    public void testM4() {
        assertSame(mc.m4_1(), mc.m4_2());
    }
}

没有main方法了

相关文章:

  • 2021-07-27
  • 2022-12-23
  • 2021-08-27
  • 2021-12-29
  • 2021-12-09
  • 2021-12-25
  • 2021-04-01
猜你喜欢
  • 2022-02-18
  • 2021-12-25
相关资源
相似解决方案