Package org.candlepin.guice

Examples of org.candlepin.guice.PrincipalProvider


        }
    }

    @Test
    public void testApply() throws IOException {
        PrincipalProvider pp = mock(PrincipalProvider.class);
        when(pp.get()).thenReturn(TestUtil.createPrincipal("admin", null, null));
        EventFactory factory = new EventFactory(pp);
        Consumer c = TestUtil.createConsumer();
        Event e = factory.consumerCreated(c);

        String value = publisher.apply(e);
View Full Code Here


        assertEquals(e.getTarget(), e1.getTarget());
    }

    @Test
    public void onEvent() throws JMSException {
        PrincipalProvider pp = mock(PrincipalProvider.class);
        when(pp.get()).thenReturn(TestUtil.createPrincipal("admin", null, null));
        EventFactory factory = new EventFactory(pp);
        Consumer c = TestUtil.createConsumer();
        Event e = factory.consumerCreated(c);
        TopicPublisher tp = publisherMap.get(Target.CONSUMER).get(Type.CREATED);
View Full Code Here

TOP

Related Classes of org.candlepin.guice.PrincipalProvider

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.