예제 #1
0
 @Test(expected = NotFoundException.class)
 public void testConsumerExistsNo() {
   when(mockedConsumerCurator.doesConsumerExist(any(String.class))).thenReturn(false);
   ConsumerResource cr =
       new ConsumerResource(
           mockedConsumerCurator,
           null,
           null,
           null,
           null,
           null,
           null,
           i18n,
           null,
           null,
           null,
           null,
           null,
           null,
           null,
           null,
           null,
           null,
           mockedComplianceRules,
           null,
           null,
           null,
           new CandlepinCommonTestConfig(),
           null,
           null,
           null,
           consumerBindUtil,
           productCurator,
           null);
   cr.consumerExists("uuid");
 }
예제 #2
0
 @Test
 public void testConsumerExistsYes() {
   when(mockedConsumerCurator.doesConsumerExist(any(String.class))).thenReturn(true);
   ConsumerResource cr =
       new ConsumerResource(
           mockedConsumerCurator,
           null,
           null,
           null,
           null,
           null,
           null,
           i18n,
           null,
           null,
           null,
           null,
           null,
           null,
           null,
           null,
           null,
           null,
           mockedComplianceRules,
           null,
           null,
           null,
           new CandlepinCommonTestConfig(),
           null,
           null,
           null,
           consumerBindUtil,
           productCurator,
           null);
   cr.consumerExists("uuid");
 }