public void TestValidDuplicateHasDuplicate(HasDuplicateParams param, Enums.ValidDuplicated dup) { var handler = new DefaultManager(); var request = DuplicateValues[dup]()[param.GetEnumStringValue()]; var response = handler.Send <object>(DuplicateCheckEndpoint, request, HttpMethod.POST); PrAssert.That(response, PrIs.SuccessfulResponse().And.HttpCode(System.Net.HttpStatusCode.OK), MsgSuccess); }
public void TestInvalidInjectionHasDuplicate(HasDuplicateParams param, Enums.InvalidInjection invalid) { var handler = new DefaultManager(); var request = GenerateDefaultRequest(); request[param.GetEnumStringValue()] = MapperData.InvalidInjectionMapper[invalid]; var response = handler.Send <object>(DuplicateCheckEndpoint, JsonConvert.SerializeObject(request), HttpMethod.POST); PrAssert.That(response, PrIs.ErrorResponse().And.HttpCode(System.Net.HttpStatusCode.BadRequest), MsgSuccess); }