Exemplo n.º 1
0
 @Test
 public void listModifyingNoResults() {
   Entitlement ent = setupListModifyingEntitlement();
   List<Entitlement> results =
       entitlementCurator.listModifying(
           consumer, "notarealproduct", ent.getStartDate(), ent.getEndDate());
   assertEquals(0, results.size());
 }
Exemplo n.º 2
0
 @Test
 public void listProvidingNoResults() {
   Entitlement ent = setupListProvidingEntitlement();
   Set<Entitlement> results =
       entitlementCurator.listProviding(
           consumer, "nosuchproductid", ent.getStartDate(), ent.getEndDate());
   assertEquals(0, results.size());
 }
Exemplo n.º 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());
 }
Exemplo n.º 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());
 }