juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexo...@apache.org
Subject juddi git commit: JUDDI-908 adding test case
Date Thu, 08 Jan 2015 23:43:39 GMT
Repository: juddi
Updated Branches:
  refs/heads/master d71952704 -> 9be9a865d


JUDDI-908 adding test case


Project: http://git-wip-us.apache.org/repos/asf/juddi/repo
Commit: http://git-wip-us.apache.org/repos/asf/juddi/commit/9be9a865
Tree: http://git-wip-us.apache.org/repos/asf/juddi/tree/9be9a865
Diff: http://git-wip-us.apache.org/repos/asf/juddi/diff/9be9a865

Branch: refs/heads/master
Commit: 9be9a865dea400aa4647b5b336bc6f2799dc8b13
Parents: d719527
Author: Alex <alexoree@apache.org>
Authored: Thu Jan 8 18:43:33 2015 -0500
Committer: Alex <alexoree@apache.org>
Committed: Thu Jan 8 18:43:33 2015 -0500

----------------------------------------------------------------------
 .../impl/API_060_PublisherAssertionTest.java    | 35 ++++++++++++++++++++
 .../juddi/v3/tck/TckPublisherAssertion.java     |  8 ++---
 2 files changed, 39 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/juddi/blob/9be9a865/juddi-core/src/test/java/org/apache/juddi/api/impl/API_060_PublisherAssertionTest.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/test/java/org/apache/juddi/api/impl/API_060_PublisherAssertionTest.java
b/juddi-core/src/test/java/org/apache/juddi/api/impl/API_060_PublisherAssertionTest.java
index e144a75..50ce739 100644
--- a/juddi-core/src/test/java/org/apache/juddi/api/impl/API_060_PublisherAssertionTest.java
+++ b/juddi-core/src/test/java/org/apache/juddi/api/impl/API_060_PublisherAssertionTest.java
@@ -24,6 +24,7 @@ import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.juddi.Registry;
+import org.apache.juddi.jaxb.EntityCreator;
 import org.apache.juddi.v3.tck.TckBusiness;
 import org.apache.juddi.v3.tck.TckFindEntity;
 import org.apache.juddi.v3.tck.TckPublisher;
@@ -34,6 +35,9 @@ import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
+import org.uddi.api_v3.DeletePublisherAssertions;
+import org.uddi.api_v3.PublisherAssertion;
+import org.uddi.v3_service.DispositionReportFaultMessage;
 import org.uddi.v3_service.UDDISecurityPortType;
 
 public class API_060_PublisherAssertionTest {
@@ -152,4 +156,35 @@ public class API_060_PublisherAssertionTest {
 			tckTModel.deleteMaryPublisherTmodel(authInfoMary);
 		}
 	}
+        
+        /**
+         * covers <a href="https://issues.apache.org/jira/browse/JUDDI-908">JUDDI-908</a>
+
+         * @throws Exception 
+         */
+        @Test(expected = DispositionReportFaultMessage.class)
+        public void deleteAssertionNonowner() throws Exception{
+                try {
+			tckTModel.saveJoePublisherTmodel(authInfoJoe);
+			tckTModel.saveSamSyndicatorTmodel(authInfoSam);
+			tckBusiness.saveJoePublisherBusiness(authInfoJoe);
+			tckBusiness.saveSamSyndicatorBusiness(authInfoSam);
+			tckAssertion.saveJoePublisherPublisherAssertion(authInfoJoe);	
+                      
+			DeletePublisherAssertions dp = new DeletePublisherAssertions();
+			dp.setAuthInfo(authInfoMary);
+			
+			PublisherAssertion paIn = (PublisherAssertion)EntityCreator.buildFromDoc(TckPublisherAssertion.JOE_ASSERT_XML,
"org.uddi.api_v3");
+			dp.getPublisherAssertion().add(paIn);
+			
+                        new UDDIPublicationImpl().deletePublisherAssertions(dp);
+			//
+		} finally {
+                        tckAssertion.deleteJoePublisherPublisherAssertion(authInfoJoe);
+			tckBusiness.deleteJoePublisherBusiness(authInfoJoe);
+			tckBusiness.deleteSamSyndicatorBusiness(authInfoSam);
+			tckTModel.deleteJoePublisherTmodel(authInfoJoe);
+			tckTModel.deleteSamSyndicatorTmodel(authInfoSam);
+		}
+        }
 }

http://git-wip-us.apache.org/repos/asf/juddi/blob/9be9a865/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckPublisherAssertion.java
----------------------------------------------------------------------
diff --git a/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckPublisherAssertion.java
b/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckPublisherAssertion.java
index 0db5584..a7726e3 100644
--- a/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckPublisherAssertion.java
+++ b/uddi-tck-base/src/main/java/org/apache/juddi/v3/tck/TckPublisherAssertion.java
@@ -33,10 +33,10 @@ import org.uddi.v3_service.UDDIPublicationPortType;
  */
 public class TckPublisherAssertion 
 {
-	final static String JOE_ASSERT_XML    = "uddi_data/joepublisher/publisherAssertion.xml";
-	final static String MARY_ASSERT_XML    = "uddi_data/marypublisher/publisherAssertion.xml";
-	final static String JOE_ASSERT2_XML    = "uddi_data/joepublisher/publisherAssertion2.xml";
-	final static String SAM_ASSERT_XML    = "uddi_data/samsyndicator/publisherAssertion.xml";
+	public final static String JOE_ASSERT_XML    = "uddi_data/joepublisher/publisherAssertion.xml";
+	public final static String MARY_ASSERT_XML    = "uddi_data/marypublisher/publisherAssertion.xml";
+	public final static String JOE_ASSERT2_XML    = "uddi_data/joepublisher/publisherAssertion2.xml";
+	public final static String SAM_ASSERT_XML    = "uddi_data/samsyndicator/publisherAssertion.xml";
 	
 	private Log logger = LogFactory.getLog(this.getClass());
 	private UDDIPublicationPortType publication = null;


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


Mime
View raw message