testselectchargecodeservlet.java

来自「考勤管理系统源码」· Java 代码 · 共 43 行

JAVA
43
字号
package com.wiley.compBooks.EJwithUML.TimecardUI;import java.io.*;import javax.servlet.http.*;import javax.servlet.*;import junit.framework.TestCase;import com.wiley.compBooks.EJwithUML.Base.TestUtilities.*;import com.wiley.compBooks.EJwithUML.Base.HtmlPrimitives.ContentElements.*;import com.wiley.compBooks.EJwithUML.Base.HtmlPrimitives.Layout.*;import com.wiley.compBooks.EJwithUML.Base.HtmlPrimitives.Core.*;public class TestSelectChargeCodeServlet extends TestCase{  private TestFileSet testFileSet;  public TestSelectChargeCodeServlet(String name) throws IOException  {    super(name);    testFileSet = new TestFileSet("C:/EJwithUML2e/UnitTestResults/TimecardUI/SelectChargeCodeServlet/");  }  public void testBuildPopulatedGrid() throws Exception  {    StringWriter writer = new StringWriter();    DummyHttpServletRequest request = new DummyHttpServletRequest();    DummyHttpServletResponse response = new DummyHttpServletResponse(new PrintWriter(writer));    SelectChargeCodeServlet selectChargeCodeServlet = new SelectChargeCodeServlet();    selectChargeCodeServlet.doGet(request, response);    boolean match = testFileSet.fileMatchesGold("BuildPopulatedGrid.html", writer.toString());    assertEquals("BuildPopulatedGrid", true, match);  }  public static void main(String args[])  {    junit.textui.TestRunner.run(TestSelectChargeCodeServlet.class);  }}

⌨️ 快捷键说明

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