Ejemplo n.º 1
0
        public void Post_Test()
        {
            // Arrange
            var    mockService       = new Mock <IAppointmentTestEmployeeService>();
            var    controller        = new AppointmentTestEmployeeController(mockService.Object);
            string employeeName      = "name";
            int    employeeId        = 1;
            int    appointmentTestId = 1;
            int    userId            = 1;


            // Act
            IHttpActionResult actionResult = controller.Post(appointmentTestId, employeeId, employeeName, userId);
            var createdResult = actionResult as OkNegotiatedContentResult <int>;

            // Assert
            Assert.IsNotNull(createdResult);
            Assert.IsTrue(createdResult.Content >= 0);
        }