示例#1
0
        public void DeleteEmploymentHistory()
        {
            // Arrange
            EmploymentHistoryController controller = new EmploymentHistoryController();

            var actResult = controller.Delete(1);
            // Act
            var result = actResult as OkNegotiatedContentResult <bool>;

            // Assert
            Assert.IsNotNull(result);
            Assert.IsTrue(result.Content == true);
        }
示例#2
0
        public void getEmploymentHistory()
        {
            // Arrange
            EmploymentHistoryController controller = new EmploymentHistoryController();

            var actResult = controller.Get(1);
            // Act
            var result = actResult as OkNegotiatedContentResult <EmploymentHistory>;

            // Assert
            Assert.IsNotNull(result);
            Assert.IsTrue(result.Content.ID == 1);
        }
示例#3
0
        public void PostEmploymentHistory()
        {
            // Arrange
            EmploymentHistoryController controller = new EmploymentHistoryController();

            EmploymentHistory EmploymentHistoryObj = new EmploymentHistory
            {
                Designation = "Dev",
                Comments    = "Good Work",
            };
            var actResult = controller.Post(EmploymentHistoryObj);
            // Act
            var result = actResult as OkNegotiatedContentResult <EmploymentHistory>;

            // Assert
            Assert.IsNotNull(result);
            Assert.IsTrue(result.Content.ID > 0);
        }
示例#4
0
        public void PutEmploymentHistory()
        {
            // Arrange
            EmploymentHistoryController controller = new EmploymentHistoryController();

            EmploymentHistory EmploymentHistoryObj = new EmploymentHistory
            {
                Designation = "Put request sucessfull",
                Comments    = "Good Work",
                ID          = 1
            };
            var actResult = controller.Put(1, EmploymentHistoryObj);
            // Act
            var result = actResult as OkNegotiatedContentResult <EmploymentHistory>;

            // Assert
            Assert.IsNotNull(result);
            Assert.IsTrue(result.Content.Designation.Equals("Put request sucessfull"));
        }