001: package org.objectweb.celtix.bus.ws.addressing;
002:
003: import javax.xml.namespace.QName;
004:
005: import junit.framework.TestCase;
006:
007: import org.objectweb.celtix.ws.addressing.AddressingConstants;
008:
009: public class AddressingConstantsImplTest extends TestCase {
010: private AddressingConstants constants;
011:
012: public void setUp() {
013: constants = new AddressingConstantsImpl();
014: }
015:
016: public void testGetNamespaceURI() throws Exception {
017: assertEquals("unexpected constant",
018: "http://www.w3.org/2005/08/addressing", constants
019: .getNamespaceURI());
020: }
021:
022: public void testGetNamespacePrefix() throws Exception {
023: assertEquals("unexpected constant", "wsa", constants
024: .getNamespacePrefix());
025: }
026:
027: public void testGetWSDLNamespaceURI() throws Exception {
028: assertEquals("unexpected constant",
029: "http://www.w3.org/2005/08/addressing/wsdl", constants
030: .getWSDLNamespaceURI());
031: }
032:
033: public void testGetWSDLNamespacePrefix() throws Exception {
034: assertEquals("unexpected constant", "wsaw", constants
035: .getWSDLNamespacePrefix());
036: }
037:
038: public void testGetWSDLExtensibility() throws Exception {
039: assertEquals("unexpected constant", new QName(
040: "http://www.w3.org/2005/08/addressing/wsdl",
041: "UsingAddressing"), constants
042: .getWSDLExtensibilityQName());
043: }
044:
045: public void testGetWSDLActionQName() throws Exception {
046: assertEquals("unexpected constant", new QName(
047: "http://www.w3.org/2005/08/addressing/wsdl", "Action"),
048: constants.getWSDLActionQName());
049: }
050:
051: public void testGetAnonymousURI() throws Exception {
052: assertEquals("unexpected constant",
053: "http://www.w3.org/2005/08/addressing/anonymous",
054: constants.getAnonymousURI());
055: }
056:
057: public void testGetNoneURI() throws Exception {
058: assertEquals("unexpected constant",
059: "http://www.w3.org/2005/08/addressing/none", constants
060: .getNoneURI());
061: }
062:
063: public void testGetFromQName() throws Exception {
064: assertEquals("unexpected constant", new QName(
065: "http://www.w3.org/2005/08/addressing", "From"),
066: constants.getFromQName());
067: }
068:
069: public void testGetToQName() throws Exception {
070: assertEquals("unexpected constant", new QName(
071: "http://www.w3.org/2005/08/addressing", "To"),
072: constants.getToQName());
073: }
074:
075: public void testGetReplyToQName() throws Exception {
076: assertEquals("unexpected constant", new QName(
077: "http://www.w3.org/2005/08/addressing", "ReplyTo"),
078: constants.getReplyToQName());
079: }
080:
081: public void testGetFaultToQName() throws Exception {
082: assertEquals("unexpected constant", new QName(
083: "http://www.w3.org/2005/08/addressing", "FaultTo"),
084: constants.getFaultToQName());
085: }
086:
087: public void testGetActionQName() throws Exception {
088: assertEquals("unexpected constant", new QName(
089: "http://www.w3.org/2005/08/addressing", "Action"),
090: constants.getActionQName());
091: }
092:
093: public void testGetMessageIDQName() throws Exception {
094: assertEquals("unexpected constant", new QName(
095: "http://www.w3.org/2005/08/addressing", "MessageID"),
096: constants.getMessageIDQName());
097: }
098:
099: public void testGetRelationshipReply() throws Exception {
100: assertEquals("unexpected constant",
101: "http://www.w3.org/2005/08/addressing/reply", constants
102: .getRelationshipReply());
103: }
104:
105: public void testGetRelatesToQName() throws Exception {
106: assertEquals("unexpected constant", new QName(
107: "http://www.w3.org/2005/08/addressing", "RelatesTo"),
108: constants.getRelatesToQName());
109: }
110:
111: public void testGetRelationshipTypeQName() throws Exception {
112: assertEquals("unexpected constant", new QName(
113: "http://www.w3.org/2005/08/addressing",
114: "RelationshipType"), constants
115: .getRelationshipTypeQName());
116: }
117:
118: public void testGetMetadataQName() throws Exception {
119: assertEquals("unexpected constant", new QName(
120: "http://www.w3.org/2005/08/addressing", "Metadata"),
121: constants.getMetadataQName());
122: }
123:
124: public void testGetAddressQName() throws Exception {
125: assertEquals("unexpected constant", new QName(
126: "http://www.w3.org/2005/08/addressing", "Address"),
127: constants.getAddressQName());
128: }
129:
130: public void testGetPackageName() throws Exception {
131: assertEquals("unexpected constant",
132: "org.objectweb.celtix.bus.ws.addressing", constants
133: .getPackageName());
134: }
135:
136: public void testGetIsReferenceParameterQName() throws Exception {
137: assertEquals("unexpected constant", new QName(
138: "http://www.w3.org/2005/08/addressing",
139: "IsReferenceParameter"), constants
140: .getIsReferenceParameterQName());
141: }
142:
143: public void testGetInvalidMapQName() throws Exception {
144: assertEquals("unexpected constant", new QName(
145: "http://www.w3.org/2005/08/addressing",
146: "InvalidMessageAddressingProperty"), constants
147: .getInvalidMapQName());
148: }
149:
150: public void testMapRequiredQName() throws Exception {
151: assertEquals("unexpected constant", new QName(
152: "http://www.w3.org/2005/08/addressing",
153: "MessageAddressingPropertyRequired"), constants
154: .getMapRequiredQName());
155: }
156:
157: public void testDestinationUnreachableQName() throws Exception {
158: assertEquals("unexpected constant", new QName(
159: "http://www.w3.org/2005/08/addressing",
160: "DestinationUnreachable"), constants
161: .getDestinationUnreachableQName());
162: }
163:
164: public void testActionNotSupportedQName() throws Exception {
165: assertEquals("unexpected constant", new QName(
166: "http://www.w3.org/2005/08/addressing",
167: "ActionNotSupported"), constants
168: .getActionNotSupportedQName());
169: }
170:
171: public void testEndpointUnavailableQName() throws Exception {
172: assertEquals("unexpected constant", new QName(
173: "http://www.w3.org/2005/08/addressing",
174: "EndpointUnavailable"), constants
175: .getEndpointUnavailableQName());
176: }
177:
178: public void testDefaultFaultAction() throws Exception {
179: assertEquals("unexpected constant",
180: "http://www.w3.org/2005/08/addressing/fault", constants
181: .getDefaultFaultAction());
182: }
183:
184: public void testActionNotSupportedText() throws Exception {
185: assertEquals("unexpected constant", "Action {0} not supported",
186: constants.getActionNotSupportedText());
187: }
188:
189: public void testDestinationUnreachableText() throws Exception {
190: assertEquals("unexpected constant",
191: "Destination {0} unreachable", constants
192: .getDestinationUnreachableText());
193: }
194:
195: public void testEndpointUnavailableText() throws Exception {
196: assertEquals("unexpected constant", "Endpoint {0} unavailable",
197: constants.getEndpointUnavailableText());
198: }
199:
200: public void testGetInvalidMapText() throws Exception {
201: assertEquals("unexpected constant",
202: "Invalid Message Addressing Property {0}", constants
203: .getInvalidMapText());
204: }
205:
206: public void testMapRequiredText() throws Exception {
207: assertEquals("unexpected constant",
208: "Message Addressing Property {0} required", constants
209: .getMapRequiredText());
210: }
211:
212: public void testDuplicateMessageIDText() throws Exception {
213: assertEquals("unexpected constant", "Duplicate Message ID {0}",
214: constants.getDuplicateMessageIDText());
215: }
216: }
|