Exemplo n.º 1
0
 public void InsertAll_ShouldReturn_NonNull_Boolean()
 {
     //Arrange
     IList<AttendeeDTO> attendeeDtos = new List<AttendeeDTO> { new AttendeeDTO { FirstName = "FName", LastName = "LName", Company = "Company", Email = "*****@*****.**", IsEligible = true, HasWon = true } };
     using (new TransactionScope()) {
         //Act
         IAttendee attendee = new Attendee();
         bool returnSuccess = attendee.InsertAll(attendeeDtos);
         //Assert
         Assert.IsInstanceOfType(returnSuccess, typeof(bool));
     }
 }
Exemplo n.º 2
0
 public void InsertsAll_ShouldReturn_NonNull_Boolean()
 {
     //Arrange
     const bool success = true;
     _mockRepo.Expect(x => x.InsertAll(new List<AttendeeDTO>())).IgnoreArguments().Return(success).Repeat.Once();
     _mockRepository.ReplayAll();
     //Act
     IAttendee attendee = new Attendee(_mockRepo);
     bool returnSuccess = attendee.InsertAll(new List<AttendeeDTO>());
     //Assert
     _mockRepository.VerifyAll();
     Assert.IsInstanceOfType(returnSuccess, typeof(bool));
 }