testemployee.java

来自「著名的uncle Bob的Agile software development的」· Java 代码 · 共 36 行

JAVA
36
字号

import junit.framework.TestCase;
import junit.swingui.TestRunner;

import java.util.Date;

public class TestEmployee extends TestCase
{
  public static void main(String[] args)
  {
    TestRunner.main(new String[]{"TestEmployee"});
  }

  public TestEmployee(String name)
  {
    super(name);
  }

  public void setUp() throws Exception
  {
  }

  public void tearDown() throws Exception
  {
  }

  public void testNull() throws Exception
  {
    Employee e = DB.getEmployee("Bob");
    if (e.isTimeToPay(new Date()))
      fail();
    assertEquals(Employee.NULL, e);
  }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?