public void GetAllEligible_ShouldReturn_NonNull_ListOf_AttendeeDTO() { //Act IAttendee attendee = new Attendee(); IList<AttendeeDTO> attendeeDtos = attendee.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 _mockRepo.Expect(x => x.GetAllEligible()).Return(new List<AttendeeDTO>()).Repeat.Once(); _mockRepository.ReplayAll(); //Act IAttendee attendee = new Attendee(_mockRepo); IList<AttendeeDTO> attendeeDtos = attendee.GetAllEligible(); //Assert _mockRepository.VerifyAll(); attendeeDtos.ShouldNotBeNull("Expected AttendeeDTO List Not To Be Null"); Assert.IsInstanceOfType(attendeeDtos, typeof(IList<AttendeeDTO>)); }