testresetprimitive.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 TestResetPrimitive extends TestCase{  private TestFileSet testFileSet;  public TestResetPrimitive(String name) throws IOException  {    super(name);    testFileSet = new TestFileSet("C:/EJwithUML2e/UnitTestResults/HtmlPrimitives/FormPrimitives/ResetPrimitive/");  }  public void testEmptyReset() throws IOException  {    StringBuffer buffer = new StringBuffer();    ResetPrimitive reset = new ResetPrimitive();    reset.buildContent(buffer);    boolean match = testFileSet.fileMatchesGold("EmptyReset.html", buffer.toString());    assertEquals("EmptyReset", match, true);  }  public void testResetWithLabel() throws IOException  {    StringBuffer buffer = new StringBuffer();    ResetPrimitive reset = new ResetPrimitive("Press the Button");    reset.buildContent(buffer);    boolean match = testFileSet.fileMatchesGold("ResetWithLabel.html", buffer.toString());    assertEquals("ResetWithLabel", match, true);  }  public void testResetWithLabelAndName() throws IOException  {    StringBuffer buffer = new StringBuffer();    ResetPrimitive reset = new ResetPrimitive("Press the Button");    reset.setName("Reset1");    reset.buildContent(buffer);    boolean match = testFileSet.fileMatchesGold("ResetWithLabelAndName.html", buffer.toString());    assertEquals("ResetWithLabelAndName", match, true);  }}

⌨️ 快捷键说明

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