public void DepartmentController_Add() { // Arrange // Set up Prerequisites CheckPropertyValidation cpv = new CheckPropertyValidation(); // Act on Test - For Post var response = controller.Add(Correct_data); var errorcount = cpv.CheckValidation(Correct_data); var errorcount1 = cpv.CheckValidation(Incorrect_Data); // Assert the result Assert.IsNotNull(response); Assert.AreEqual(0, errorcount.Count, "Test Performed Successfully."); Assert.AreNotEqual(0, errorcount1.Count, "Total validation error : " + errorcount1.Count.ToString()); Assert.Pass(); }