1 /* 2 * Copyright (c) 2001-2004 World Wide Web Consortium, 3 * (Massachusetts Institute of Technology, Institut National de 4 * Recherche en Informatique et en Automatique, Keio University). All 5 * Rights Reserved. This program is distributed under the W3C's Software 6 * Intellectual Property License. This program is distributed in the 7 * hope that it will be useful, but WITHOUT ANY WARRANTY; without even 8 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 9 * PURPOSE. 10 * See W3C License http://www.w3.org/Consortium/Legal/ for more details. 11 */ 12 13 package org.w3c.domts; 14 15 import java.util.Collection; 16 import java.util.List; 17 18 import javax.xml.parsers.DocumentBuilder; 19 20 import org.w3c.dom.NamedNodeMap; 21 import org.w3c.dom.NodeList; 22 23 /** 24 * This interface provides services typically provided by a test framework 25 */ 26 public interface DOMTestFramework { hasFeature( DocumentBuilder docBuilder, String feature, String version)27 boolean hasFeature( 28 DocumentBuilder docBuilder, 29 String feature, 30 String version); 31 wait(int millisecond)32 void wait(int millisecond); 33 fail(DOMTestCase test, String assertID)34 void fail(DOMTestCase test, String assertID); 35 assertTrue(DOMTestCase test, String assertID, boolean actual)36 void assertTrue(DOMTestCase test, String assertID, boolean actual); 37 assertFalse(DOMTestCase test, String assertID, boolean actual)38 void assertFalse(DOMTestCase test, String assertID, boolean actual); 39 assertNull(DOMTestCase test, String assertID, Object actual)40 void assertNull(DOMTestCase test, String assertID, Object actual); 41 assertNotNull(DOMTestCase test, String assertID, Object actual)42 void assertNotNull(DOMTestCase test, String assertID, Object actual); 43 assertSame( DOMTestCase test, String assertID, Object expected, Object actual)44 void assertSame( 45 DOMTestCase test, 46 String assertID, 47 Object expected, 48 Object actual); 49 assertInstanceOf( DOMTestCase test, String assertID, Object obj, Class cls)50 void assertInstanceOf( 51 DOMTestCase test, 52 String assertID, 53 Object obj, 54 Class cls); 55 assertSize( DOMTestCase test, String assertID, int expectedSize, NodeList collection)56 void assertSize( 57 DOMTestCase test, 58 String assertID, 59 int expectedSize, 60 NodeList collection); 61 assertSize( DOMTestCase test, String assertID, int expectedSize, NamedNodeMap collection)62 void assertSize( 63 DOMTestCase test, 64 String assertID, 65 int expectedSize, 66 NamedNodeMap collection); 67 assertSize( DOMTestCase test, String assertID, int expectedSize, Collection collection)68 void assertSize( 69 DOMTestCase test, 70 String assertID, 71 int expectedSize, 72 Collection collection); 73 assertEqualsIgnoreCase( DOMTestCase test, String assertID, String expected, String actual)74 void assertEqualsIgnoreCase( 75 DOMTestCase test, 76 String assertID, 77 String expected, 78 String actual); 79 assertEqualsIgnoreCase( DOMTestCase test, String assertID, Collection expected, Collection actual)80 void assertEqualsIgnoreCase( 81 DOMTestCase test, 82 String assertID, 83 Collection expected, 84 Collection actual); 85 assertEqualsIgnoreCase( DOMTestCase test, String assertID, List expected, List actual)86 void assertEqualsIgnoreCase( 87 DOMTestCase test, 88 String assertID, 89 List expected, 90 List actual); 91 assertEquals( DOMTestCase test, String assertID, String expected, String actual)92 void assertEquals( 93 DOMTestCase test, 94 String assertID, 95 String expected, 96 String actual); 97 assertEquals( DOMTestCase test, String assertID, int expected, int actual)98 void assertEquals( 99 DOMTestCase test, 100 String assertID, 101 int expected, 102 int actual); 103 assertEquals( DOMTestCase test, String assertID, boolean expected, boolean actual)104 void assertEquals( 105 DOMTestCase test, 106 String assertID, 107 boolean expected, 108 boolean actual); 109 assertEquals( DOMTestCase test, String assertID, double expected, double actual)110 void assertEquals( 111 DOMTestCase test, 112 String assertID, 113 double expected, 114 double actual); 115 assertEquals( DOMTestCase test, String assertID, Collection expected, Collection actual)116 void assertEquals( 117 DOMTestCase test, 118 String assertID, 119 Collection expected, 120 Collection actual); 121 assertNotEqualsIgnoreCase( DOMTestCase test, String assertID, String expected, String actual)122 void assertNotEqualsIgnoreCase( 123 DOMTestCase test, 124 String assertID, 125 String expected, 126 String actual); 127 assertNotEquals( DOMTestCase test, String assertID, String expected, String actual)128 void assertNotEquals( 129 DOMTestCase test, 130 String assertID, 131 String expected, 132 String actual); 133 assertNotEquals( DOMTestCase test, String assertID, int expected, int actual)134 void assertNotEquals( 135 DOMTestCase test, 136 String assertID, 137 int expected, 138 int actual); 139 assertNotEquals( DOMTestCase test, String assertID, boolean expected, boolean actual)140 void assertNotEquals( 141 DOMTestCase test, 142 String assertID, 143 boolean expected, 144 boolean actual); 145 assertNotEquals( DOMTestCase test, String assertID, double expected, double actual)146 void assertNotEquals( 147 DOMTestCase test, 148 String assertID, 149 double expected, 150 double actual); 151 same(Object expected, Object actual)152 boolean same(Object expected, Object actual); 153 equalsIgnoreCase(String expected, String actual)154 boolean equalsIgnoreCase(String expected, String actual); 155 equalsIgnoreCase(Collection expected, Collection actual)156 boolean equalsIgnoreCase(Collection expected, Collection actual); 157 equalsIgnoreCase(List expected, List actual)158 boolean equalsIgnoreCase(List expected, List actual); 159 equals(String expected, String actual)160 boolean equals(String expected, String actual); 161 equals(int expected, int actual)162 boolean equals(int expected, int actual); 163 equals(boolean expected, boolean actual)164 boolean equals(boolean expected, boolean actual); 165 equals(double expected, double actual)166 boolean equals(double expected, double actual); 167 equals(Collection expected, Collection actual)168 boolean equals(Collection expected, Collection actual); 169 equals(List expected, List actual)170 boolean equals(List expected, List actual); 171 size(Collection collection)172 int size(Collection collection); 173 size(NamedNodeMap collection)174 int size(NamedNodeMap collection); 175 size(NodeList collection)176 int size(NodeList collection); 177 } 178