Package org.candlepin.service

Examples of org.candlepin.service.UserServiceAdapter


    @Test(expected = NotFoundException.class)
    public void testNullPerson() {
        Consumer c = mock(Consumer.class);
        Owner o = mock(Owner.class);
        UserServiceAdapter usa = mock(UserServiceAdapter.class);
        UserPrincipal up = mock(UserPrincipal.class);
        OwnerCurator oc = mock(OwnerCurator.class);
        ConsumerTypeCurator ctc = mock(ConsumerTypeCurator.class);
        ConsumerType cType = new ConsumerType(ConsumerTypeEnum.PERSON);
View Full Code Here


    @Test
    public void findByLogin() {
        User u = mock(User.class);
        UserCurator curator = mock(UserCurator.class);
        RoleCurator roleCurator = mock(RoleCurator.class);
        UserServiceAdapter dusa = new DefaultUserServiceAdapter(curator,
                roleCurator);
        when(curator.findByLogin(anyString())).thenReturn(u);

        User foo = dusa.findByLogin("foo");
        assertNotNull(foo);
        assertEquals(foo, u);
    }
View Full Code Here

TOP

Related Classes of org.candlepin.service.UserServiceAdapter

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.