📄 testsubmitprimitive.java
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -