testsubmitprimitive.java

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

JAVA
48
字号
package com.wiley.compBooks.EJwithUML.Base.HtmlPrimitives.FormPrimitives;import junit.framework.TestCase;import com.wiley.compBooks.EJwithUML.Base.TestUtilities.*;import com.wiley.compBooks.EJwithUML.Base.HtmlPrimitives.ContentElements.*;import java.io.*;public class TestSubmitPrimitive extends TestCase{  private TestFileSet testFileSet;  public TestSubmitPrimitive(String name) throws IOException  {    super(name);    testFileSet = new TestFileSet("C:/EJwithUML2e/UnitTestResults/HtmlPrimitives/FormPrimitives/SubmitPrimitive/");  }  public void testEmptySubmit() throws IOException  {    StringBuffer buffer = new StringBuffer();    SubmitPrimitive submit = new SubmitPrimitive();    submit.buildContent(buffer);    boolean match = testFileSet.fileMatchesGold("EmptySubmit.html", buffer.toString());    assertEquals("EmptySubmit", match, true);  }  public void testSubmitWithLabel() throws IOException  {    StringBuffer buffer = new StringBuffer();    SubmitPrimitive submit = new SubmitPrimitive("Press the Button");    submit.buildContent(buffer);    boolean match = testFileSet.fileMatchesGold("SubmitWithLabel.html", buffer.toString());    assertEquals("SubmitWithLabel", match, true);  }  public void testSubmitWithLabelAndName() throws IOException  {    StringBuffer buffer = new StringBuffer();    SubmitPrimitive submit = new SubmitPrimitive("Press the Button");    submit.setName("submit1");    submit.buildContent(buffer);    boolean match = testFileSet.fileMatchesGold("SubmitWithLabelAndName.html", buffer.toString());    assertEquals("SubmitWithLabelAndName", match, true);  }}

⌨️ 快捷键说明

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