juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ks...@apache.org
Subject svn commit: r726623 - in /webservices/juddi/branches/v3_trunk/juddi-core/src/test/java/org/apache/juddi/api/impl: API_020_TmodelTest.java API_030_BusinessEntityTest.java
Date Mon, 15 Dec 2008 06:18:47 GMT
Author: kstam
Date: Sun Dec 14 22:18:46 2008
New Revision: 726623

URL: http://svn.apache.org/viewvc?rev=726623&view=rev
Log:
JUDDI-142, Restructuring the unittests - adding sam

Modified:
    webservices/juddi/branches/v3_trunk/juddi-core/src/test/java/org/apache/juddi/api/impl/API_020_TmodelTest.java
    webservices/juddi/branches/v3_trunk/juddi-core/src/test/java/org/apache/juddi/api/impl/API_030_BusinessEntityTest.java

Modified: webservices/juddi/branches/v3_trunk/juddi-core/src/test/java/org/apache/juddi/api/impl/API_020_TmodelTest.java
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/juddi-core/src/test/java/org/apache/juddi/api/impl/API_020_TmodelTest.java?rev=726623&r1=726622&r2=726623&view=diff
==============================================================================
--- webservices/juddi/branches/v3_trunk/juddi-core/src/test/java/org/apache/juddi/api/impl/API_020_TmodelTest.java
(original)
+++ webservices/juddi/branches/v3_trunk/juddi-core/src/test/java/org/apache/juddi/api/impl/API_020_TmodelTest.java
Sun Dec 14 22:18:46 2008
@@ -37,19 +37,37 @@
 	final static String JOE_PUBLISHER_TMODEL_XML      = "api_xml_data/joepublisher/tModelKeyGen.xml";
     final static String JOE_PUBLISHER_TMODEL_KEY      = "uddi:juddi.apache.org:joepublisher:KEYGENERATOR";
     
+    final static String SAM_SYNDICATOR_TMODEL_XML     = "api_xml_data/samsyndicator/tModelKeyGen.xml";
+    final static String SAM_SYNDICATOR_TMODEL_KEY     = "uddi:juddi.apache.org:samco:repository:keygenerator";
+    
 	private static UDDIPublicationImpl publish = new UDDIPublicationImpl();
 	private static UDDIInquiryImpl inquiry     = new UDDIInquiryImpl();
 	private static Logger logger               = Logger.getLogger(API_020_TmodelTest.class);
 	
 	@Test
 	public void joePublisher() {
+		String publisherId  = API_010_PublisherTest.JOE_PUBLISHER_ID;
+		String publisherXML = API_010_PublisherTest.JOE_PUBLISHER_XML;
+		API_010_PublisherTest api010 = new API_010_PublisherTest();
+		if (!api010.isExistPublisher(publisherId)) {
+			//Add the Publisher
+			api010.savePublisher(publisherId, publisherXML);
+		}
+		saveTModel(publisherId, JOE_PUBLISHER_TMODEL_XML, JOE_PUBLISHER_TMODEL_KEY);
+		deleteTModel(publisherId, JOE_PUBLISHER_TMODEL_XML, JOE_PUBLISHER_TMODEL_KEY);
+	}
+	
+	@Test
+	public void samSyndicator() {
+		String publisherId  = API_010_PublisherTest.SAM_SYNDICATOR_ID;
+		String publisherXML = API_010_PublisherTest.SAM_SYNDICATOR_XML;
 		API_010_PublisherTest api010 = new API_010_PublisherTest();
-		if (!api010.isExistPublisher(API_010_PublisherTest.JOE_PUBLISHER_ID)) {
+		if (!api010.isExistPublisher(publisherId)) {
 			//Add the Publisher
-			api010.savePublisher(API_010_PublisherTest.JOE_PUBLISHER_ID, API_010_PublisherTest.JOE_PUBLISHER_XML);
+			api010.savePublisher(publisherId, publisherXML);
 		}
-		saveTModel(API_010_PublisherTest.JOE_PUBLISHER_ID, JOE_PUBLISHER_TMODEL_XML, JOE_PUBLISHER_TMODEL_KEY);
-		deleteTModel(API_010_PublisherTest.JOE_PUBLISHER_ID, JOE_PUBLISHER_TMODEL_XML, JOE_PUBLISHER_TMODEL_KEY);
+		saveTModel(publisherId, SAM_SYNDICATOR_TMODEL_XML, SAM_SYNDICATOR_TMODEL_KEY);
+		deleteTModel(publisherId, SAM_SYNDICATOR_TMODEL_XML, SAM_SYNDICATOR_TMODEL_KEY);
 	}
 	
 	public void saveTModel(String publisherId, String tModelXml, String tModelKey) {

Modified: webservices/juddi/branches/v3_trunk/juddi-core/src/test/java/org/apache/juddi/api/impl/API_030_BusinessEntityTest.java
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/juddi-core/src/test/java/org/apache/juddi/api/impl/API_030_BusinessEntityTest.java?rev=726623&r1=726622&r2=726623&view=diff
==============================================================================
--- webservices/juddi/branches/v3_trunk/juddi-core/src/test/java/org/apache/juddi/api/impl/API_030_BusinessEntityTest.java
(original)
+++ webservices/juddi/branches/v3_trunk/juddi-core/src/test/java/org/apache/juddi/api/impl/API_030_BusinessEntityTest.java
Sun Dec 14 22:18:46 2008
@@ -34,8 +34,12 @@
  */
 public class API_030_BusinessEntityTest {
 	
-	final static String BUSINESS_XML    = "api_xml_data/joepublisher/businessEntity.xml";
-    final static String BUSINESS_KEY    = "uddi:juddi.apache.org:joepublisher:businessone";
+	final static String JOE_BUSINESS_XML    = "api_xml_data/joepublisher/businessEntity.xml";
+    final static String JOE_BUSINESS_KEY    = "uddi:juddi.apache.org:joepublisher:businessone";
+    
+    final static String SAM_BUSINESS_XML    = "api_xml_data/samsyndicator/businessEntity.xml";
+    final static String SAM_BUSINESS_KEY    = "uddi:juddi.apache.org:samco:repository:samco";
+    
     
 	private static UDDIPublicationImpl publish = new UDDIPublicationImpl();
 	private static UDDIInquiryImpl inquiry     = new UDDIInquiryImpl();
@@ -43,18 +47,35 @@
 	
 	@Test
 	public void joePublisher() {
-		
+		String publisherId = API_010_PublisherTest.JOE_PUBLISHER_ID;
+		try {
+			API_010_PublisherTest api010 = new API_010_PublisherTest();
+			if (!api010.isExistPublisher(publisherId)) {
+				//Add the Publisher
+				api010.savePublisher(publisherId, API_010_PublisherTest.JOE_PUBLISHER_XML);
+			}
+			new API_020_TmodelTest().saveTModel(publisherId, API_020_TmodelTest.JOE_PUBLISHER_TMODEL_XML,
API_020_TmodelTest.JOE_PUBLISHER_TMODEL_KEY);
+			saveBusiness(publisherId, JOE_BUSINESS_XML, JOE_BUSINESS_KEY);
+			deleteBusiness(publisherId, JOE_BUSINESS_XML, JOE_BUSINESS_KEY);
+		} finally {
+			new API_020_TmodelTest().deleteTModel(publisherId, API_020_TmodelTest.JOE_PUBLISHER_TMODEL_XML,
API_020_TmodelTest.JOE_PUBLISHER_TMODEL_KEY);
+		}
+	}
+	
+	@Test
+	public void samSyndicator() {
+		String publisherId = API_010_PublisherTest.SAM_SYNDICATOR_ID;
 		try {
 			API_010_PublisherTest api010 = new API_010_PublisherTest();
-			if (!api010.isExistPublisher(API_010_PublisherTest.JOE_PUBLISHER_ID)) {
+			if (!api010.isExistPublisher(publisherId)) {
 				//Add the Publisher
-				api010.savePublisher(API_010_PublisherTest.JOE_PUBLISHER_ID, API_010_PublisherTest.JOE_PUBLISHER_XML);
+				api010.savePublisher(publisherId, API_010_PublisherTest.SAM_SYNDICATOR_XML);
 			}
-			new API_020_TmodelTest().saveTModel(API_010_PublisherTest.JOE_PUBLISHER_ID, API_020_TmodelTest.JOE_PUBLISHER_TMODEL_XML,
API_020_TmodelTest.JOE_PUBLISHER_TMODEL_KEY);
-			saveBusiness(API_010_PublisherTest.JOE_PUBLISHER_ID, BUSINESS_XML, BUSINESS_KEY);
-			deleteBusiness(API_010_PublisherTest.JOE_PUBLISHER_ID, BUSINESS_XML, BUSINESS_KEY);
+			new API_020_TmodelTest().saveTModel(publisherId, API_020_TmodelTest.SAM_SYNDICATOR_TMODEL_XML,
API_020_TmodelTest.SAM_SYNDICATOR_TMODEL_KEY);
+			saveBusiness(publisherId, SAM_BUSINESS_XML, SAM_BUSINESS_KEY);
+			deleteBusiness(publisherId, SAM_BUSINESS_XML, SAM_BUSINESS_KEY);
 		} finally {
-			new API_020_TmodelTest().deleteTModel(API_010_PublisherTest.JOE_PUBLISHER_ID, API_020_TmodelTest.JOE_PUBLISHER_TMODEL_XML,
API_020_TmodelTest.JOE_PUBLISHER_TMODEL_KEY);
+			new API_020_TmodelTest().deleteTModel(publisherId, API_020_TmodelTest.SAM_SYNDICATOR_TMODEL_XML,
API_020_TmodelTest.SAM_SYNDICATOR_TMODEL_KEY);
 		}
 	}
 	



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


Mime
View raw message