1 19 20 package org.netbeans.modules.xml.xam.ui.highlight; 21 22 import junit.framework.Test; 23 import junit.framework.TestCase; 24 import junit.framework.TestSuite; 25 import org.netbeans.modules.xml.schema.model.Schema; 26 import org.netbeans.modules.xml.schema.model.SchemaModel; 27 import org.netbeans.modules.xml.xam.Component; 28 import org.netbeans.modules.xml.xam.ui.Util; 29 30 35 public class HighlightTest extends TestCase { 36 private Schema schema; 37 private SchemaModel model; 38 39 public HighlightTest(String testName) { 40 super(testName); 41 } 42 43 @Override 44 protected void setUp() throws Exception { 45 model = Util.loadSchemaModel(Util.PO_XSD); 46 schema = model.getSchema(); 47 } 48 49 @Override 50 protected void tearDown() throws Exception { 51 } 52 53 56 public void testGetSchemaComponent() { 57 Highlight instance = new TestHighlight(schema, "type"); 58 Component result = instance.getComponent(); 59 assertEquals(schema, result); 60 } 61 62 65 public void testGetType() { 66 String expResult = "type"; 67 Highlight instance = new TestHighlight(schema, expResult); 68 String result = instance.getType(); 69 assertEquals(expResult, result); 70 } 71 } 72 | Popular Tags |