public void InvalidDeleteMailServer(MailServerTestData.Invalid invalid, string param) { var handler = new DefaultManager(); var request = new Dictionary <string, object>(); MailServerTestData.InvalidIncomingMapperValue[invalid](request, param); var response = handler.Send <object>(MailServer.Server, request.ToJson(), HttpMethod.DELETE); PrAssert.That(response, PrIs.ErrorResponse().And.HttpCode(System.Net.HttpStatusCode.BadRequest), "Can not create mail server"); }
public void InvalidCreateMailServer(MailServerTestData.Invalid invalid, string param) { var handler = new DefaultManager(); var request = new Dictionary <string, object>(); MailServerTestData.ValidIncomingMapperValue[MailServerTestData.Valid.Porters](request, MailServerTestData.Server); MailServerTestData.ValidIncomingMapperValue[MailServerTestData.Valid.POP3Port](request, MailServerTestData.Port); MailServerTestData.ValidIncomingMapperValue[MailServerTestData.Valid.Zero](request, MailServerTestData.Ssl); MailServerTestData.ValidIncomingMapperValue[MailServerTestData.Valid.POP3Protocol](request, MailServerTestData.Protocol); MailServerTestData.InvalidIncomingMapperValue[invalid](request, param); var response = handler.Send <object>(MailServer.Server, request.ToJson(), HttpMethod.POST); PrAssert.That(response, PrIs.ErrorResponse().And.HttpCode(System.Net.HttpStatusCode.BadRequest), "Can not create mail server"); }