public async void CheckComplaintTicketNumber_ExpectedFound() { string ticketNumber; var httpClient = new HttpClient(); var json = await httpClient.GetAsync($"{EndPoints.BaseUrl}{EndPoints.Contacts}/{TestData4.ContactIdComplaint}"); var strJson = await json.Content.ReadAsStringAsync(); ContactVm contacvm = JsonConvert.DeserializeObject <ContactVm>(strJson); Assert.IsType <ContactVm>(contacvm); var httpClient2 = new HttpClient(); var json2 = await httpClient2.GetAsync($"{EndPoints.BaseUrl}/{EndPoints.Complaint}/{TestData4.Complaint4TicketNumber}"); var strJson2 = await json2.Content.ReadAsStringAsync(); ComplaintVm complaintContactVm = JsonConvert.DeserializeObject <ComplaintVm>(strJson2); Assert.IsType <ComplaintVm>(complaintContactVm); Assert.NotNull(complaintContactVm); bool result = complaintContactVm.ComplaintContact.TicketNumber.StartsWith(contacvm.NationalId); Assert.True(result); //ticketNumber = contacvm.NationalId; //ticketNumber += "-30-"; //ticketNumber += contacvm.bhs_LTN_Complaint; //Assert.Equal(complaintContactVm.ComplaintContact.TicketNumber, ticketNumber); }
public async void GetComplaintById_ExpectedFound() { var httpClient = new HttpClient(); var json = await httpClient.GetAsync($"{EndPoints.BaseUrl}{EndPoints.Complaint}/{TestData4.ComplaintId}"); var strJson = await json.Content.ReadAsStringAsync(); ComplaintVm complaintVm = JsonConvert.DeserializeObject <ComplaintVm>(strJson); Assert.IsType <ComplaintVm>(complaintVm); Assert.NotNull(complaintVm); Assert.IsType <Int32>(complaintVm.AccuseType); }