?? testspanprimitive.java
字號:
package com.wiley.compBooks.EJwithUML.Base.HtmlPrimitives.ContentElements;import junit.framework.*;import com.wiley.compBooks.EJwithUML.Base.TestUtilities.*;import com.wiley.compBooks.EJwithUML.Base.HtmlPrimitives.Core.*;import com.wiley.compBooks.EJwithUML.Base.HtmlPrimitives.Layout.*;import java.io.*;public class TestSpanPrimitive extends TestCase{ private TestFileSet testFileSet; public TestSpanPrimitive(String name) throws IOException { super(name); testFileSet = new TestFileSet("C:/EJwithUML2e/UnitTestResults/HtmlPrimitives/ContentElements/SpanPrimitive/"); } public void testVariedStyles() throws IOException { StringBuffer buffer = new StringBuffer(); SpanPrimitive title = new SpanPrimitive(Style.PAGE_TITLE,"The Document"); SpanPrimitive content = new SpanPrimitive(Style.NORMAL_TEXT,"The rain in spain falls mainly on the plains."); content.addText("Except when it falls on the hills..."); content.addLineBreak(); content.addText("some more normal text"); PagePrimitive page = new PagePrimitive("Varied Styles", "../../Default.css"); page.addToBody(title); page.addToBody(content); page.buildContent(buffer); boolean match = testFileSet.fileMatchesGold("VariedStyles.html", buffer.toString()); assertEquals("VariedStyles", match, true); }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -