Repository: juddi Updated Branches: refs/heads/master 42f4697e2 -> 538158da0
JUDDI-899 adding test cases for this issue Project: http://git-wip-us.apache.org/repos/asf/juddi/repo Commit: http://git-wip-us.apache.org/repos/asf/juddi/commit/538158da Tree: http://git-wip-us.apache.org/repos/asf/juddi/tree/538158da Diff: http://git-wip-us.apache.org/repos/asf/juddi/diff/538158da Branch: refs/heads/master Commit: 538158da00b9c0c05c69368e22577d5592e0448f Parents: 42f4697 Author: Alex <[email protected]> Authored: Mon Dec 29 21:33:32 2014 -0500 Committer: Alex <[email protected]> Committed: Mon Dec 29 21:33:32 2014 -0500 ---------------------------------------------------------------------- .../juddi/api/impl/API_070_FindEntityTest.java | 52 +++++++++++++++++++- 1 file changed, 50 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/juddi/blob/538158da/juddi-core/src/test/java/org/apache/juddi/api/impl/API_070_FindEntityTest.java ---------------------------------------------------------------------- diff --git a/juddi-core/src/test/java/org/apache/juddi/api/impl/API_070_FindEntityTest.java b/juddi-core/src/test/java/org/apache/juddi/api/impl/API_070_FindEntityTest.java index 1a082ec..1f76c97 100644 --- a/juddi-core/src/test/java/org/apache/juddi/api/impl/API_070_FindEntityTest.java +++ b/juddi-core/src/test/java/org/apache/juddi/api/impl/API_070_FindEntityTest.java @@ -159,17 +159,65 @@ public class API_070_FindEntityTest { } + /** + * matches for tModel by catbag, default settings, exact match + * @throws Exception + */ @Test - public void JUDDI_899() throws Exception { UDDIInquiryImpl inquiry = new UDDIInquiryImpl(); + + FindTModel ftm = new FindTModel(); + ftm.setAuthInfo(authInfoJoe); + ftm.setCategoryBag(new CategoryBag()); + ftm.getCategoryBag().getKeyedReference().add(new KeyedReference("uddi:uddi.org:categorization:types", "uddi-org:types:keyGenerator", "keyGenerator")); + TModelList findTModel = inquiry.findTModel(ftm); + Assert.assertNotNull(findTModel); + Assert.assertNotNull(findTModel.getTModelInfos()); + Assert.assertNotNull(findTModel.getTModelInfos().getTModelInfo()); + + } + + /** + * matches for tModel by catbag, default settings, approximate match + * @throws Exception + */ + @Test + public void JUDDI_899_1() throws Exception { + UDDIInquiryImpl inquiry = new UDDIInquiryImpl(); + + FindTModel ftm = new FindTModel(); + ftm.setFindQualifiers(new FindQualifiers()); + ftm.getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH); + ftm.setAuthInfo(authInfoJoe); + ftm.setCategoryBag(new CategoryBag()); + ftm.getCategoryBag().getKeyedReference().add(new KeyedReference("uddi:uddi.org:categorization:types", "uddi-org:types:keyGenerator", "key%")); + TModelList findTModel = inquiry.findTModel(ftm); + Assert.assertNotNull(findTModel); + Assert.assertNotNull(findTModel.getTModelInfos()); + Assert.assertNotNull(findTModel.getTModelInfos().getTModelInfo()); + + } + + /** + * matches for tModel by catbag, default settings, case insensitive + * @throws Exception + */ + @Test + public void JUDDI_899_2() throws Exception { + UDDIInquiryImpl inquiry = new UDDIInquiryImpl(); + UDDIPublicationImpl pub = new UDDIPublicationImpl(); FindTModel ftm = new FindTModel(); ftm.setAuthInfo(authInfoJoe); + ftm.setFindQualifiers(new FindQualifiers()); + ftm.getFindQualifiers().getFindQualifier().add(UDDIConstants.CASE_INSENSITIVE_MATCH); + ftm.setCategoryBag(new CategoryBag()); - ftm.getCategoryBag().getKeyedReference().add(new KeyedReference("uddi:uddi.org:categorization:types", "uddi-org:types:keyGenerator", "keyGenerator")); + //all of the defeault installed data is for "keyGenerator" + ftm.getCategoryBag().getKeyedReference().add(new KeyedReference("uddi:uddi.org:categorization:types", "uddi-org:types:keyGenerator", "keygenerator")); TModelList findTModel = inquiry.findTModel(ftm); Assert.assertNotNull(findTModel); Assert.assertNotNull(findTModel.getTModelInfos()); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
