use of tech.aroma.thrift.User in project aroma-data-operations by RedRoma.
the class MemoryUserRepositoryTest method testGetUser.
@Test
public void testGetUser() throws Exception {
instance.saveUser(user);
User result = instance.getUser(userId);
assertThat(result, is(user));
}
use of tech.aroma.thrift.User in project aroma-data-operations by RedRoma.
the class MeasuredUserRepositoryTest method testGetUserByEmail.
@Test
public void testGetUserByEmail() throws Exception {
when(delegate.getUserByEmail(email)).thenReturn(user);
User result = instance.getUserByEmail(email);
assertThat(result, is(user));
verify(delegate).getUserByEmail(email);
}
use of tech.aroma.thrift.User in project aroma-data-operations by RedRoma.
the class MeasuredUserRepositoryTest method testFindByGithubProfile.
@Test
public void testFindByGithubProfile() throws Exception {
when(delegate.findByGithubProfile(githubProfile)).thenReturn(user);
User result = instance.findByGithubProfile(githubProfile);
assertThat(result, is(user));
verify(delegate).findByGithubProfile(githubProfile);
}
use of tech.aroma.thrift.User in project aroma-data-operations by RedRoma.
the class MemoryActivityRepositoryTest method testGetAllEventsForWithBadArgs.
@Test
public void testGetAllEventsForWithBadArgs() throws Exception {
assertThrows(() -> instance.getAllEventsFor(null)).isInstanceOf(InvalidArgumentException.class);
assertThrows(() -> instance.getAllEventsFor(new User())).isInstanceOf(InvalidArgumentException.class);
}
use of tech.aroma.thrift.User in project aroma-data-operations by RedRoma.
the class MemoryActivityRepositoryTest method testDeleteEventWithBadArgs.
@Test
public void testDeleteEventWithBadArgs() throws Exception {
assertThrows(() -> instance.deleteEvent("", user)).isInstanceOf(InvalidArgumentException.class);
assertThrows(() -> instance.deleteEvent(eventId, null)).isInstanceOf(InvalidArgumentException.class);
assertThrows(() -> instance.deleteEvent(eventId, new User())).isInstanceOf(InvalidArgumentException.class);
}
Aggregations