You are viewing a plain text version of this content. The canonical link for it is here.
Posted to woden-dev@ws.apache.org by jk...@apache.org on 2007/01/23 11:03:31 UTC

svn commit: r498971 - /incubator/woden/trunk/java/test/org/apache/woden/wsdl20/xml/DescriptiontElementTest.java

Author: jkaputin
Date: Tue Jan 23 02:03:30 2007
New Revision: 498971

URL: http://svn.apache.org/viewvc?view=rev&rev=498971
Log:
WODEN-51 On some of the assertEquals calls swapped
the two comparison arguments around so that 'expected'
is first followed by 'actual' because that is the order
the method assumes they are in when it reports and 
error.

Modified:
    incubator/woden/trunk/java/test/org/apache/woden/wsdl20/xml/DescriptiontElementTest.java

Modified: incubator/woden/trunk/java/test/org/apache/woden/wsdl20/xml/DescriptiontElementTest.java
URL: http://svn.apache.org/viewvc/incubator/woden/trunk/java/test/org/apache/woden/wsdl20/xml/DescriptiontElementTest.java?view=diff&rev=498971&r1=498970&r2=498971
==============================================================================
--- incubator/woden/trunk/java/test/org/apache/woden/wsdl20/xml/DescriptiontElementTest.java (original)
+++ incubator/woden/trunk/java/test/org/apache/woden/wsdl20/xml/DescriptiontElementTest.java Tue Jan 23 02:03:30 2007
@@ -81,7 +81,7 @@
 	public void testAddGetNamespace() {
 		fDescriptionElement.addNamespace(fPrefix1,fNamespace1);
 		URI uri = fDescriptionElement.getNamespace(fPrefix1);
-		assertEquals("Retrieved NamespaceURI does not match that set", uri, fNamespace1);
+		assertEquals("Retrieved NamespaceURI does not match that set", fNamespace1, uri);
 	}
 	
 	/*
@@ -105,8 +105,8 @@
 		assertEquals("Expected 2 namespaces", uriMap.size(),2);
 		URI uri1 = (URI)uriMap.get(fPrefix1);
 		URI uri2 = (URI)uriMap.get(fPrefix2);
-		assertEquals("Expected NamespaceURI not found", uri1, fNamespace1);
-		assertEquals("Expected NamespaceURI not found", uri2, fNamespace2);	
+		assertEquals("Expected NamespaceURI not found", fNamespace1, uri1);
+		assertEquals("Expected NamespaceURI not found", fNamespace2, uri2);	
 	}
 	
 
@@ -114,40 +114,40 @@
 		ImportElement importElement1 = fDescriptionElement.addImportElement();
 		ImportElement importElement2 = fDescriptionElement.addImportElement();
 		ImportElement[] imports = fDescriptionElement.getImportElements();
-		assertEquals("Expected 2 import elements", imports.length, 2);
+		assertEquals("Expected 2 import elements", 2, imports.length);
 	}
 
 	public void testAddGetIncludeElements() {
 		IncludeElement includeElement1 = fDescriptionElement.addIncludeElement();
 		IncludeElement includeElement2 = fDescriptionElement.addIncludeElement();
 		IncludeElement[] includes = fDescriptionElement.getIncludeElements();
-		assertEquals("Expected 2 include elements", includes.length, 2);
+		assertEquals("Expected 2 include elements", 2, includes.length);
 	}
 
 	public void testAddGetInterfaceElements() {
 		InterfaceElement interfaceElement1 = fDescriptionElement.addInterfaceElement();
 		InterfaceElement interfaceElement2 = fDescriptionElement.addInterfaceElement();
 		InterfaceElement[] interfaces = fDescriptionElement.getInterfaceElements();
-		assertEquals("Expected 2 interface elements", interfaces.length, 2);
+		assertEquals("Expected 2 interface elements", 2, interfaces.length);
 	}
 
 	public void testAddGetBindingElements() {
 		BindingElement bindingElement1 = fDescriptionElement.addBindingElement();
 		BindingElement bindingElement2 = fDescriptionElement.addBindingElement();
 		BindingElement[] bindings = fDescriptionElement.getBindingElements();
-		assertEquals("Expected 2 binding elements", bindings.length, 2);
+		assertEquals("Expected 2 binding elements", 2, bindings.length);
 	}
 
 	public void testAddGetServiceElements() {
 		ServiceElement serviceElement1 = fDescriptionElement.addServiceElement();
 		ServiceElement serviceElement2 = fDescriptionElement.addServiceElement();
 		ServiceElement[] services = fDescriptionElement.getServiceElements();
-		assertEquals("Expected 2 service elements", services.length, 2);
+		assertEquals("Expected 2 service elements", 2, services.length);
 	}
 
 	/*
 	 * Call the method once to create a new TypesElement and check that its parent is the
-	 * DecsriptionElement under test.
+	 * DescriptionElement under test.
 	 * Call the method again and ensure the same TypesElement object is returned.
 	 */
 	public void testGetTypesElement() {
@@ -168,7 +168,7 @@
 		fDescriptionElement.setExtensionRegistry(er);
 		ExtensionRegistry erRetrieved = fDescriptionElement.getExtensionRegistry();
 		assertNotNull("Null given but ExtensionRegistry object expected", erRetrieved);
-		assertSame("Retrieved ExtensionRegistry object differs fromt hat set", er, erRetrieved);
+		assertSame("Retrieved ExtensionRegistry object differs from that set", er, erRetrieved);
 	}
 
 	public void testToComponent() {



---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org