public void InsertTaTutorErrorTest() { //// Arrange var errors = new List <string>(); var mockRepository = new Mock <ITaTutorRepository>(); var tatutorService = new TaTutorService(mockRepository.Object); //// Act tatutorService.InsertTaTutor(null, ref errors); //// Assert Assert.AreEqual(1, errors.Count); }
public void InsertTaTutorBadFirstName() { //// Arranage var errors = new List <string>(); var mockRepository = new Mock <ITaTutorRepository>(); var tatutorService = new TaTutorService(mockRepository.Object); var tatutor = new TaTutor { TaTutorId = "A0123456", FirstName = "J4ne", LastName = "Doe" }; //// Act tatutorService.InsertTaTutor(tatutor, ref errors); //// Assert Assert.AreEqual(1, errors.Count); }