public void TestUpdateDuplicateParameterTemplateType(TemplateTypeParameters param, Enums.ValidDuplicated inputType) { var handler = new DefaultManager(); var request = BuildTemplateTypeRequest(Ids.First()); DuplicateTemplateTypeParameters[param](inputType, Ids.ElementAt(1), request); var response = handler.Send <object>(TemplateEndPoint, JsonConvert.SerializeObject(request).Replace("_Dup", string.Empty), HttpMethod.PUT); PrAssert.That(response, PrIs.SuccessfulResponse().And.HttpCode(System.Net.HttpStatusCode.NoContent)); }
public void TestInvalidUpdateTemplateTypeInjection(TemplateTypeParameters param, Enums.InvalidInjection invalid) { var handler = new DefaultManager(); var request = BuildTemplateTypeRequest(Id); request[param.GetEnumStringValue()] = MapperData.InvalidInjectionMapper[invalid]; var response = handler.Send <object>(TemplateTypeEndPoint, JsonConvert.SerializeObject(request), HttpMethod.PUT); PrAssert.That(response, PrIs.ErrorResponse().And.HttpCode(System.Net.HttpStatusCode.BadRequest)); }