| 1 package org.objectweb.celtix.bus.ws.addressing; 2 3 4 import javax.xml.namespace.QName ; 5 6 import junit.framework.TestCase; 7 8 import org.objectweb.celtix.ws.addressing.AddressingConstants; 9 10 11 public class AddressingConstantsImplTest extends TestCase { 12 private AddressingConstants constants; 13 14 public void setUp() { 15 constants = new AddressingConstantsImpl(); 16 } 17 18 public void testGetNamespaceURI() throws Exception { 19 assertEquals("unexpected constant", 20 "http://www.w3.org/2005/08/addressing", 21 constants.getNamespaceURI()); 22 } 23 24 public void testGetNamespacePrefix() throws Exception { 25 assertEquals("unexpected constant", 26 "wsa", 27 constants.getNamespacePrefix()); 28 } 29 30 public void testGetWSDLNamespaceURI() throws Exception { 31 assertEquals("unexpected constant", 32 "http://www.w3.org/2005/08/addressing/wsdl", 33 constants.getWSDLNamespaceURI()); 34 } 35 36 public void testGetWSDLNamespacePrefix() throws Exception { 37 assertEquals("unexpected constant", 38 "wsaw", 39 constants.getWSDLNamespacePrefix()); 40 } 41 42 public void testGetWSDLExtensibility() throws Exception { 43 assertEquals("unexpected constant", 44 new QName ("http://www.w3.org/2005/08/addressing/wsdl", 45 "UsingAddressing"), 46 constants.getWSDLExtensibilityQName()); 47 } 48 49 public void testGetWSDLActionQName() throws Exception { 50 assertEquals("unexpected constant", 51 new QName ("http://www.w3.org/2005/08/addressing/wsdl", 52 "Action"), 53 constants.getWSDLActionQName()); 54 } 55 56 public void testGetAnonymousURI() throws Exception { 57 assertEquals("unexpected constant", 58 "http://www.w3.org/2005/08/addressing/anonymous", 59 constants.getAnonymousURI()); 60 } 61 62 public void testGetNoneURI() throws Exception { 63 assertEquals("unexpected constant", 64 "http://www.w3.org/2005/08/addressing/none", 65 constants.getNoneURI()); 66 } 67 68 public void testGetFromQName() throws Exception { 69 assertEquals("unexpected constant", 70 new QName ("http://www.w3.org/2005/08/addressing", 71 "From"), 72 constants.getFromQName()); 73 } 74 75 public void testGetToQName() throws Exception { 76 assertEquals("unexpected constant", 77 new QName ("http://www.w3.org/2005/08/addressing", 78 "To"), 79 constants.getToQName()); 80 } 81 82 public void testGetReplyToQName() throws Exception { 83 assertEquals("unexpected constant", 84 new QName ("http://www.w3.org/2005/08/addressing", 85 "ReplyTo"), 86 constants.getReplyToQName()); 87 } 88 89 public void testGetFaultToQName() throws Exception { 90 assertEquals("unexpected constant", 91 new QName ("http://www.w3.org/2005/08/addressing", 92 "FaultTo"), 93 constants.getFaultToQName()); 94 } 95 96 public void testGetActionQName() throws Exception { 97 assertEquals("unexpected constant", 98 new QName ("http://www.w3.org/2005/08/addressing", 99 "Action"), 100 constants.getActionQName()); 101 } 102 103 public void testGetMessageIDQName() throws Exception { 104 assertEquals("unexpected constant", 105 new QName ("http://www.w3.org/2005/08/addressing", 106 "MessageID"), 107 constants.getMessageIDQName()); 108 } 109 110 public void testGetRelationshipReply() throws Exception { 111 assertEquals("unexpected constant", 112 "http://www.w3.org/2005/08/addressing/reply", 113 constants.getRelationshipReply()); 114 } 115 116 public void testGetRelatesToQName() throws Exception { 117 assertEquals("unexpected constant", 118 new QName ("http://www.w3.org/2005/08/addressing", 119 "RelatesTo"), 120 constants.getRelatesToQName()); 121 } 122 123 public void testGetRelationshipTypeQName() throws Exception { 124 assertEquals("unexpected constant", 125 new QName ("http://www.w3.org/2005/08/addressing", 126 "RelationshipType"), 127 constants.getRelationshipTypeQName()); 128 } 129 130 public void testGetMetadataQName() throws Exception { 131 assertEquals("unexpected constant", 132 new QName ("http://www.w3.org/2005/08/addressing", 133 "Metadata"), 134 constants.getMetadataQName()); 135 } 136 137 public void testGetAddressQName() throws Exception { 138 assertEquals("unexpected constant", 139 new QName ("http://www.w3.org/2005/08/addressing", 140 "Address"), 141 constants.getAddressQName()); 142 } 143 144 public void testGetPackageName() throws Exception { 145 assertEquals("unexpected constant", 146 "org.objectweb.celtix.bus.ws.addressing", 147 constants.getPackageName()); 148 } 149 150 public void testGetIsReferenceParameterQName() throws Exception { 151 assertEquals("unexpected constant", 152 new QName ("http://www.w3.org/2005/08/addressing", 153 "IsReferenceParameter"), 154 constants.getIsReferenceParameterQName()); 155 } 156 157 public void testGetInvalidMapQName() throws Exception { 158 assertEquals("unexpected constant", 159 new QName ("http://www.w3.org/2005/08/addressing", 160 "InvalidMessageAddressingProperty"), 161 constants.getInvalidMapQName()); 162 } 163 164 public void testMapRequiredQName() throws Exception { 165 assertEquals("unexpected constant", 166 new QName ("http://www.w3.org/2005/08/addressing", 167 "MessageAddressingPropertyRequired"), 168 constants.getMapRequiredQName()); 169 } 170 171 public void testDestinationUnreachableQName() throws Exception { 172 assertEquals("unexpected constant", 173 new QName ("http://www.w3.org/2005/08/addressing", 174 "DestinationUnreachable"), 175 constants.getDestinationUnreachableQName()); 176 } 177 178 public void testActionNotSupportedQName() throws Exception { 179 assertEquals("unexpected constant", 180 new QName ("http://www.w3.org/2005/08/addressing", 181 "ActionNotSupported"), 182 constants.getActionNotSupportedQName()); 183 } 184 185 public void testEndpointUnavailableQName() throws Exception { 186 assertEquals("unexpected constant", 187 new QName ("http://www.w3.org/2005/08/addressing", 188 "EndpointUnavailable"), 189 constants.getEndpointUnavailableQName()); 190 } 191 192 public void testDefaultFaultAction() throws Exception { 193 assertEquals("unexpected constant", 194 "http://www.w3.org/2005/08/addressing/fault", 195 constants.getDefaultFaultAction()); 196 } 197 198 public void testActionNotSupportedText() throws Exception { 199 assertEquals("unexpected constant", 200 "Action {0} not supported", 201 constants.getActionNotSupportedText()); 202 } 203 204 public void testDestinationUnreachableText() throws Exception { 205 assertEquals("unexpected constant", 206 "Destination {0} unreachable", 207 constants.getDestinationUnreachableText()); 208 } 209 210 public void testEndpointUnavailableText() throws Exception { 211 assertEquals("unexpected constant", 212 "Endpoint {0} unavailable", 213 constants.getEndpointUnavailableText()); 214 } 215 216 public void testGetInvalidMapText() throws Exception { 217 assertEquals("unexpected constant", 218 "Invalid Message Addressing Property {0}", 219 constants.getInvalidMapText()); 220 } 221 222 223 public void testMapRequiredText() throws Exception { 224 assertEquals("unexpected constant", 225 "Message Addressing Property {0} required", 226 constants.getMapRequiredText()); 227 } 228 229 public void testDuplicateMessageIDText() throws Exception { 230 assertEquals("unexpected constant", 231 "Duplicate Message ID {0}", 232 constants.getDuplicateMessageIDText()); 233 } 234 } 235 | Popular Tags |