public void GetAllEligible_ShouldReturn_NonNull_ListOf_AttendeeDTO() { //Act IAttendeeService service = new AttendeeService(); IList<AttendeeDTO> attendeeDtos = service.GetAllEligible(); //Assert attendeeDtos.ShouldNotBeNull("Expected AttendeeDTO List Not To Be Null"); Assert.IsInstanceOfType(attendeeDtos, typeof (IList<AttendeeDTO>)); }
public void GetAllEligible_ShouldReturn_NonNull_ListOf_AttendeeDTO() { //Arrange _mockAttendee.Expect(x => x.GetAllEligible()).Return(new List<AttendeeDTO>()).Repeat.Once(); _mockRepository.ReplayAll(); //Act IAttendeeService service = new AttendeeService(_mockAttendee); IList<AttendeeDTO> attendeeDtos = service.GetAllEligible(); //Assert _mockRepository.VerifyAll(); attendeeDtos.ShouldNotBeNull("Expected AttendeeDTO List Not To Be Null"); Assert.IsInstanceOfType(attendeeDtos, typeof(IList<AttendeeDTO>)); }