⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testsimpleinputformproducer.java

📁 考勤管理系统源码
💻 JAVA
字号:
package com.wiley.compBooks.EJwithUML.TimecardProducers;import java.io.*;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 TestSimpleInputFormProducer extends TestCase{  private TestFileSet testFileSet;  public TestSimpleInputFormProducer(String name) throws IOException  {    super(name);    testFileSet = new TestFileSet("C:/EJwithUML2e/UnitTestResults/TimecardProducers/");  }  public void testEmptyForm() throws IOException  {    StringBuffer buffer = new StringBuffer();    SimpleInputFormProducer form = new SimpleInputFormProducer("Login", "Please enter your username and password.", "Press the Button", "./noservlet");    PagePrimitive page = new PagePrimitive("test", "../Timecard.css");    page.addToBody(form);    page.buildContent(buffer);    boolean match = testFileSet.fileMatchesGold("EmptyForm.html", buffer.toString());    assertEquals("EmptyForm", true, match);  }  public void testForm() throws IOException  {    StringBuffer buffer = new StringBuffer();    SimpleInputFormProducer form = new SimpleInputFormProducer("Login", "Please enter your username and password.", "Press the Button", "./noservlet");    form.addField("Name", "name", "Fred");    form.addMaskedField("Password", "password", "");    form.addField("Rank", "rank", "");    form.addField("SerialNumber", "serialNumber", null);    PagePrimitive page = new PagePrimitive("test", "../Timecard.css");    page.addToBody(form);    page.buildContent(buffer);    boolean match = testFileSet.fileMatchesGold("Form.html", buffer.toString());    assertEquals("Form", true, match);  }  public static void main(String args[])  {    junit.textui.TestRunner.run(TestSimpleInputFormProducer.class);  }}

⌨️ 快捷键说明

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