public void ValidMaildCountRead(MailCountTestData.Box box, MailCountTestData.Hidden hidden) { var handler = new DefaultManager(); Dictionary <string, object> request = MailCountTestData.MailCountRequest(box, hidden); var response = handler.Send <int>(MailCount.CountRead, request.ToJson(), HttpMethod.POST); PrAssert.That(response, PrIs.SuccessfulResponse().And.HttpCode(System.Net.HttpStatusCode.OK), "Can not get mail read count"); PrAssert.That(response.Result, PrIs.GreaterThanOrEqualTo(0), "Can not read Field"); }
public void ValidMaildCountUnread(MailCountTestData.Box box, MailCountTestData.Hidden hidden) { var handler = new DefaultManager(); var request = MailCountTestData.MailCountRequest(box, hidden); var response = handler.Send <int>(MailCount.CountUnread, request.ToJson(), HttpMethod.POST); PrAssert.That(response, PrIs.SuccessfulResponse().And.HttpCode(System.Net.HttpStatusCode.OK), "Can not get mail unread count"); PrAssert.That(response.Result, PrIs.GreaterThanOrEqualTo(0), "The number of mails is negative"); }
public static Dictionary <string, object> MailCountRequest(MailCountTestData.Box box, MailCountTestData.Hidden hidden) { return(new Dictionary <string, object> { [nameof(Box).ToLower()] = (int)box, [nameof(Hidden).ToLower()] = (int)hidden, }); }