Пример #1
0
 @Test
 public void listModifyingNoResults() {
   Entitlement ent = setupListModifyingEntitlement();
   List<Entitlement> results =
       entitlementCurator.listModifying(
           consumer, "notarealproduct", ent.getStartDate(), ent.getEndDate());
   assertEquals(0, results.size());
 }
Пример #2
0
 @Test
 public void listProvidingNoResults() {
   Entitlement ent = setupListProvidingEntitlement();
   Set<Entitlement> results =
       entitlementCurator.listProviding(
           consumer, "nosuchproductid", ent.getStartDate(), ent.getEndDate());
   assertEquals(0, results.size());
 }
Пример #3
0
 @Test
 public void listModifyingProvided() {
   Entitlement ent = setupListModifyingEntitlement();
   List<Entitlement> results =
       entitlementCurator.listModifying(
           consumer, providedProduct1.getId(), ent.getStartDate(), ent.getEndDate());
   assertEquals(1, results.size());
 }
Пример #4
0
 @Test
 public void listProvidingProvidedProduct() {
   Entitlement ent = setupListProvidingEntitlement();
   // Test a successful query:
   Set<Entitlement> results =
       entitlementCurator.listProviding(
           consumer, providedProduct1.getId(), ent.getStartDate(), ent.getEndDate());
   assertEquals(1, results.size());
 }