public void TryCreateEmployeeWithNullNameParameter() { var id = Int32.Parse(testContextInstance.DataRow["EmployeeId"].ToString()); using (var client = new EmployeeManagerClient()) { client.CreateEmployee(id, null); } }
public void TryGetEmployeesWithRemarkForNoResultFound() { var id = Int32.Parse(testContextInstance.DataRow["EmployeeId"].ToString()); var name = testContextInstance.DataRow["EmployeeName"].ToString(); var employeeId = Int32.Parse(testContextInstance.DataRow["SecondEmployeeId"].ToString()); var employeeName = testContextInstance.DataRow["SecondEmployeeName"].ToString(); using (var employeeManagerClient = new EmployeeManagerClient()) { employeeManagerClient.CreateEmployee(id, name); employeeManagerClient.CreateEmployee(employeeId, employeeName); using (var employeeReaderClient = new EmployeeReaderClient()) { employeeReaderClient.GetEmployeesWithRemark(); } } }
public void TryCreateEmployeeWithInvalidIdValue() { var id = Int32.Parse(testContextInstance.DataRow["EmployeeId"].ToString()); var name = testContextInstance.DataRow["EmployeeName"].ToString(); using (var client = new EmployeeManagerClient()) { client.CreateEmployee(id, name); } }
public void TryCreateEmployee() { var id = Int32.Parse(testContextInstance.DataRow["EmployeeId"].ToString()); var name = testContextInstance.DataRow["EmployeeName"].ToString(); using (var client = new EmployeeManagerClient()) { Employee employee = client.CreateEmployee(id, name); Assert.AreEqual(id, employee.Id); } }
public void TryGetEmployeesWithRemark() { var id = Int32.Parse(testContextInstance.DataRow["EmployeeId"].ToString()); var name = testContextInstance.DataRow["EmployeeName"].ToString(); var remark = testContextInstance.DataRow["EmployeeRemark"].ToString(); var employeeId = Int32.Parse(testContextInstance.DataRow["SecondEmployeeId"].ToString()); var employeeName = testContextInstance.DataRow["SecondEmployeeName"].ToString(); var employeeCountWithRemark = Int32.Parse(testContextInstance.DataRow["EmployeeCountWithRemark"].ToString()); using (var employeeManagerClient = new EmployeeManagerClient()) { employeeManagerClient.CreateEmployeeWithRemark(id, name, remark); employeeManagerClient.CreateEmployee(employeeId, employeeName); using (var employeeReaderClient = new EmployeeReaderClient()) { Assert.AreEqual(employeeCountWithRemark, employeeReaderClient.GetEmployeesWithRemark().Count); } } }