public void Task_Add_Success_Return_True() { //Arrange var id = 1; var organizerId = 1; var emp = new Appointment() { OrganizerId = organizerId, Id = id }; AppointmentRepositoryMock.Setup(m => m.Save(emp)).Returns(emp).Verifiable(); //Act var actual = AppointmentsBusinessManager.Save(emp); //Assert Assert.AreEqual(true, actual.Success);//assert success }
public void Task_Add_ValidData_Return_Match() { //Arrange var id = 1; var organizerId = 1; var emp = new Appointment() { OrganizerId = organizerId, Id = id }; AppointmentRepositoryMock.Setup(m => m.Save(emp)).Returns(emp).Verifiable(); //Act var actual = AppointmentsBusinessManager.Save(emp); //Assert Assert.IsInstanceOfType(actual, typeof(BussinessCustomResponse <Appointment>)); //passes }