Example #1
0
        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);
        }
Example #2
0
        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);
        }