Skip to content
Permalink
Browse files
JUDDI-899 adding test cases for this issue
  • Loading branch information
spyhunter99 committed Dec 30, 2014
1 parent 42f4697 commit 538158da00b9c0c05c69368e22577d5592e0448f
Showing 1 changed file with 50 additions and 2 deletions.
@@ -159,17 +159,65 @@ public void JUDDI_843_tModel() throws Exception {

}

/**
* 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());

0 comments on commit 538158d

Please sign in to comment.