use of com.eventyay.organizer.data.sponsor.Sponsor in project open-event-orga-app by fossasia.
the class SponsorRepositoryTest method shouldSetEventOnCreatedSponsor.
@Test
public void shouldSetEventOnCreatedSponsor() {
Sponsor created = mock(Sponsor.class);
when(repository.isConnected()).thenReturn(true);
when(sponsorApi.postSponsor(SPONSOR)).thenReturn(Observable.just(created));
when(repository.save(eq(Sponsor.class), eq(created))).thenReturn(Completable.complete());
sponsorRepository.createSponsor(SPONSOR).subscribe();
verify(created).setEvent(EVENT);
}
Aggregations