public void SaveEmployee_Add_ShouldReturnInteger() { // Arrange int expected = 1; // Act int actual = BLLEmployee.InsertEmployee("Jash", 27, 35000); // Assert Assert.AreEqual(expected, actual); }
public void SaveEmployee(object sender, EventArgs e) { string Name = txtName.Text.Trim(); int Age = Convert.ToInt32(txtAge.Text); int Salary = Convert.ToInt32(txtSalary.Text); int result = BLLEmployee.InsertEmployee(Name, Age, Salary); if (result > 0) { lblMessage.Text = "Employee details Inserted Successfully"; } else if (result == -1) { lblMessage.Text = "Employee Age should not be less then 20 !"; } else { lblMessage.Text = "Employee details not Inserted"; } }