Search in sources :

Example 1 with RoleCurator

use of org.candlepin.model.RoleCurator in project candlepin by candlepin.

the class DefaultUserServiceAdapterTest method findByLogin.

@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);
}
Also used : User(org.candlepin.model.User) UserCurator(org.candlepin.model.UserCurator) UserServiceAdapter(org.candlepin.service.UserServiceAdapter) RoleCurator(org.candlepin.model.RoleCurator) Test(org.junit.Test)

Aggregations

RoleCurator (org.candlepin.model.RoleCurator)1 User (org.candlepin.model.User)1 UserCurator (org.candlepin.model.UserCurator)1 UserServiceAdapter (org.candlepin.service.UserServiceAdapter)1 Test (org.junit.Test)1