public void AddRemarkToEmployeeTest()
        {
            // add remark to employee
            var employee = new Employee() { FirstName = "Jane", LastName = "Doe", Email = "*****@*****.**", JoiningDate = DateTime.UtcNow };
            var client = new HttpClient();
            var createdEmployee = client.UploadData<Employee, Employee>(EmployeeManagementServiceUrl + "employee", employee);
            Assert.IsNotNull(createdEmployee);
            Assert.IsTrue(string.IsNullOrWhiteSpace(createdEmployee.Id) == false);

            var remark = new Remark() { Text = "Remark1" , CreateTimeStamp = DateTime.UtcNow};
            var createdRemark = client.UploadData<Remark, Remark>(EmployeeManagementServiceUrl + "employee/"+ createdEmployee.Id + "/remark", remark);
            Assert.IsNotNull(createdRemark);
            Assert.IsTrue(createdRemark.CreateTimeStamp > DateTime.MinValue);
        }
示例#2
0
 internal static Remark GetRemark(TestContext testContext)
 {
     var remark = new Remark();
     remark.Text = testContext.DataRow["Text"].ToString();
     return remark;
 }
 public void AddRemarkToNonExistingEmployeeTest()
 {
     var client = new HttpClient();
     var remark = new Remark() { Text = "Remark1" , CreateTimeStamp = DateTime.UtcNow};
     var createdRemark = client.UploadData<Remark, Remark>(EmployeeManagementServiceUrl + "employee/testid/remark", remark);
 }