public void GetFound() { var ravenDocStore = MockRepository.GenerateMock<IRavenDocStore>(); ravenDocStore.Expect(r => r.GetStore()).Return(base.DocumentStore); var smsScheduleService = new SmsScheduleService { RavenDocStore = ravenDocStore }; var request = new Schedule { ScheduleMessageId = scheduleMessageId }; var response = smsScheduleService.OnGet(request) as ScheduleModel; Assert.That(response.ScheduleMessageId, Is.EqualTo(request.ScheduleMessageId)); ravenDocStore.VerifyAllExpectations(); }
public void GetNotFound() { var ravenDocStore = MockRepository.GenerateMock<IRavenDocStore>(); ravenDocStore.Expect(r => r.GetStore()).Return(base.DocumentStore); var smsScheduleService = new SmsScheduleService { RavenDocStore = ravenDocStore }; var request = new Schedule { ScheduleMessageId = Guid.NewGuid() }; var response = smsScheduleService.OnGet(request) as SmsScheduleResponse; Assert.That(response.RequestId, Is.EqualTo(request.ScheduleMessageId)); Assert.That(response.ResponseStatus.ErrorCode, Is.EqualTo("NotFound")); ravenDocStore.VerifyAllExpectations(); }
public void GetFound() { var ravenDocStore = MockRepository.GenerateMock <IRavenDocStore>(); ravenDocStore.Expect(r => r.GetStore()).Return(base.DocumentStore); var smsScheduleService = new SmsScheduleService { RavenDocStore = ravenDocStore }; var request = new Schedule { ScheduleMessageId = scheduleMessageId }; var response = smsScheduleService.OnGet(request) as ScheduleModel; Assert.That(response.ScheduleMessageId, Is.EqualTo(request.ScheduleMessageId)); ravenDocStore.VerifyAllExpectations(); }
public void GetNotFound() { var ravenDocStore = MockRepository.GenerateMock <IRavenDocStore>(); ravenDocStore.Expect(r => r.GetStore()).Return(base.DocumentStore); var smsScheduleService = new SmsScheduleService { RavenDocStore = ravenDocStore }; var request = new Schedule { ScheduleMessageId = Guid.NewGuid() }; var response = smsScheduleService.OnGet(request) as SmsScheduleResponse; Assert.That(response.RequestId, Is.EqualTo(request.ScheduleMessageId)); Assert.That(response.ResponseStatus.ErrorCode, Is.EqualTo("NotFound")); ravenDocStore.VerifyAllExpectations(); }