Author: chris.laprun(a)jboss.com
Date: 2008-11-25 10:23:46 -0500 (Tue, 25 Nov 2008)
New Revision: 12302
Modified:
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/V1ProducerBaseTest.java
Log:
- Improved output.
Modified:
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/V1ProducerBaseTest.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/V1ProducerBaseTest.java 2008-11-24
22:49:04 UTC (rev 12301)
+++
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/test/wsrp/v1/producer/V1ProducerBaseTest.java 2008-11-25
15:23:46 UTC (rev 12302)
@@ -117,16 +117,16 @@
ExtendedAssert.assertEquals(1, markupTypes.length);
MarkupType markupType = markupTypes[0];
assertEquals(new MarkupType("text/html", new
String[]{WSRPConstants.VIEW_MODE},
- new String[]{WSRPConstants.NORMAL_WINDOW_STATE,
WSRPConstants.MAXIMIZED_WINDOW_STATE, WSRPConstants.MINIMIZED_WINDOW_STATE},
- new String[]{"en"}, null), markupType);
+ new String[]{WSRPConstants.NORMAL_WINDOW_STATE,
WSRPConstants.MAXIMIZED_WINDOW_STATE, WSRPConstants.MINIMIZED_WINDOW_STATE},
+ new String[]{"en"}, null), markupType);
}
protected ServiceDescription
checkServiceDescriptionWithOnlyBasicPortlet(GetServiceDescription gs)
- throws Exception
+ throws Exception
{
deploy("test-basic-portlet.war");
//Invoke the Web Service
- ServiceDescription sd = serviceDescriptionService.getServiceDescription(gs);
+ ServiceDescription sd = serviceDescriptionService.getServiceDescription(gs);
ExtendedAssert.assertNotNull("sd != null", sd);
@@ -149,7 +149,7 @@
}
protected RegistrationContext registerConsumer()
- throws org.jboss.portal.wsrp.core.MissingParametersFault,
org.jboss.portal.wsrp.core.OperationFailedFault, java.rmi.RemoteException
+ throws org.jboss.portal.wsrp.core.MissingParametersFault,
org.jboss.portal.wsrp.core.OperationFailedFault, java.rmi.RemoteException
{
RegistrationData registrationData = createBaseRegData();
return registrationService.register(registrationData);
@@ -173,7 +173,7 @@
{
// fix-me:
http://jira.jboss.com/jira/browse/JBPORTAL-821
RegistrationPropertyDescription regProp = new
RegistrationPropertyDescription("regProp",
- new QName("urn:oasis:names:tc:wsrp:v1:types",
"LocalizedString", "ns1"));
+ new QName("urn:oasis:names:tc:wsrp:v1:types",
"LocalizedString", "ns1"));
regProp.setDefaultLabel("Registration Property");
producer.getProducerRegistrationRequirements().addRegistrationProperty(regProp);
@@ -246,7 +246,7 @@
protected static void assertEquals(PropertyDescription expected, PropertyDescription
tested)
{
- String message = "Expected: <" + expected + ">, got:
<" + tested + ">. Failed on: ";
+ String message = "Expected: <" + expected + ">, got:
<" + tested + ">. Failed on ";
if (expected != tested)
{
@@ -255,16 +255,18 @@
ExtendedAssert.fail(message + "Different classes or not both
null.");
}
- ExtendedAssert.assertEquals(expected.getExtensions(), tested.getExtensions(),
false, message + "Extensions");
- assertEquals(message + "Hint", expected.getHint(), tested.getHint());
- assertEquals(message + "Label", expected.getLabel(),
tested.getLabel());
- ExtendedAssert.assertEquals(message + "Name", expected.getName(),
tested.getName());
- ExtendedAssert.assertEquals(message + "Type", expected.getType(),
tested.getType());
+ ExtendedAssert.assertEquals(expected.getExtensions(), tested.getExtensions(),
false, message + "extensions.");
+ assertEquals(message + "hint.", expected.getHint(),
tested.getHint());
+ assertEquals(message + "label.", expected.getLabel(),
tested.getLabel());
+ ExtendedAssert.assertEquals(message + "name.", expected.getName(),
tested.getName());
+ ExtendedAssert.assertEquals(message + "type.", expected.getType(),
tested.getType());
}
}
protected static void assertEquals(String message, LocalizedString expected,
LocalizedString tested)
{
+ String precise = "Expected: <" + expected + ">, got:
<" + tested + ">. Failed on ";
+
if (expected != tested)
{
if (expected == null || tested == null)
@@ -272,9 +274,9 @@
ExtendedAssert.fail(message + ": Different classes or not both
null.");
}
- ExtendedAssert.assertEquals(expected.getLang(), tested.getLang());
- ExtendedAssert.assertEquals(expected.getResourceName(),
tested.getResourceName());
- ExtendedAssert.assertEquals(expected.getValue(), tested.getValue());
+ ExtendedAssert.assertEquals(precise + "lang.", expected.getLang(),
tested.getLang());
+ ExtendedAssert.assertEquals(precise + "resource name.",
expected.getResourceName(), tested.getResourceName());
+ ExtendedAssert.assertEquals(precise + "value.", expected.getValue(),
tested.getValue());
}
}