예제 #1
0
        public void TestInvalidComputeAffectedField(InvalidValue invalid, ComputeAffectedField param)
        {
            var handler = new DefaultManager();
            var request = GetDefaultComputeAffectedField();

            InvalidValueMapper[invalid](request, param.GetEnumStringValue());
            var response = handler.Send <object>(AffectedFieldEndPoint, JsonConvert.SerializeObject(request), HttpMethod.POST);

            PrAssert.That(response, PrIs.ErrorResponse().And.HttpCode(System.Net.HttpStatusCode.BadRequest));
        }
예제 #2
0
        public void TestValidDuplicateComputeAffectedField(Enums.ValidDuplicated dup, ComputeAffectedField param)
        {
            var handler  = new DefaultManager();
            var request  = DuplicateValues[dup]()[param.GetEnumStringValue()];
            var response = handler.Send <object>(AffectedFieldEndPoint, request, HttpMethod.POST);

            PrAssert.That(response, PrIs.SuccessfulResponse().And.HttpCode(System.Net.HttpStatusCode.OK));
        }