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 13package org.w3c.domts; 14 15import java.util.Collection; 16import java.util.List; 17 18import javax.xml.parsers.DocumentBuilder; 19 20import org.w3c.dom.NamedNodeMap; 21import org.w3c.dom.NodeList; 22 23/** 24 * This interface provides services typically provided by a test framework 25 */ 26public interface DOMTestFramework { 27 boolean hasFeature( 28 DocumentBuilder docBuilder, 29 String feature, 30 String version); 31 32 void wait(int millisecond); 33 34 void fail(DOMTestCase test, String assertID); 35 36 void assertTrue(DOMTestCase test, String assertID, boolean actual); 37 38 void assertFalse(DOMTestCase test, String assertID, boolean actual); 39 40 void assertNull(DOMTestCase test, String assertID, Object actual); 41 42 void assertNotNull(DOMTestCase test, String assertID, Object actual); 43 44 void assertSame( 45 DOMTestCase test, 46 String assertID, 47 Object expected, 48 Object actual); 49 50 void assertInstanceOf( 51 DOMTestCase test, 52 String assertID, 53 Object obj, 54 Class cls); 55 56 void assertSize( 57 DOMTestCase test, 58 String assertID, 59 int expectedSize, 60 NodeList collection); 61 62 void assertSize( 63 DOMTestCase test, 64 String assertID, 65 int expectedSize, 66 NamedNodeMap collection); 67 68 void assertSize( 69 DOMTestCase test, 70 String assertID, 71 int expectedSize, 72 Collection collection); 73 74 void assertEqualsIgnoreCase( 75 DOMTestCase test, 76 String assertID, 77 String expected, 78 String actual); 79 80 void assertEqualsIgnoreCase( 81 DOMTestCase test, 82 String assertID, 83 Collection expected, 84 Collection actual); 85 86 void assertEqualsIgnoreCase( 87 DOMTestCase test, 88 String assertID, 89 List expected, 90 List actual); 91 92 void assertEquals( 93 DOMTestCase test, 94 String assertID, 95 String expected, 96 String actual); 97 98 void assertEquals( 99 DOMTestCase test, 100 String assertID, 101 int expected, 102 int actual); 103 104 void assertEquals( 105 DOMTestCase test, 106 String assertID, 107 boolean expected, 108 boolean actual); 109 110 void assertEquals( 111 DOMTestCase test, 112 String assertID, 113 double expected, 114 double actual); 115 116 void assertEquals( 117 DOMTestCase test, 118 String assertID, 119 Collection expected, 120 Collection actual); 121 122 void assertNotEqualsIgnoreCase( 123 DOMTestCase test, 124 String assertID, 125 String expected, 126 String actual); 127 128 void assertNotEquals( 129 DOMTestCase test, 130 String assertID, 131 String expected, 132 String actual); 133 134 void assertNotEquals( 135 DOMTestCase test, 136 String assertID, 137 int expected, 138 int actual); 139 140 void assertNotEquals( 141 DOMTestCase test, 142 String assertID, 143 boolean expected, 144 boolean actual); 145 146 void assertNotEquals( 147 DOMTestCase test, 148 String assertID, 149 double expected, 150 double actual); 151 152 boolean same(Object expected, Object actual); 153 154 boolean equalsIgnoreCase(String expected, String actual); 155 156 boolean equalsIgnoreCase(Collection expected, Collection actual); 157 158 boolean equalsIgnoreCase(List expected, List actual); 159 160 boolean equals(String expected, String actual); 161 162 boolean equals(int expected, int actual); 163 164 boolean equals(boolean expected, boolean actual); 165 166 boolean equals(double expected, double actual); 167 168 boolean equals(Collection expected, Collection actual); 169 170 boolean equals(List expected, List actual); 171 172 int size(Collection collection); 173 174 int size(NamedNodeMap collection); 175 176 int size(NodeList collection); 177} 178