Пример #1
0
        public async Task WhenQueryingExternalDataWithMissingCustomerId_ThenNotFoundShouldBeReturned()
        {
            var client        = new ExternalSystemSetup().BuildClient();
            var exportAbsence = await client.GetAsync($"/externaldata");

            Assert.NotNull(exportAbsence);
            Assert.AreEqual(HttpStatusCode.NotFound, exportAbsence.StatusCode);
        }
Пример #2
0
        public async Task WhenQueryingExternalDataIncorrectUrl_ThenNotFoundShouldBeReturned()
        {
            var externalSystemId   = 2;
            var client             = new ExternalSystemSetup().BuildClient();
            var externalDataResult = await client.GetAsync($"{externalSystemId}/externaldata");

            Assert.NotNull(externalDataResult);
            Assert.AreEqual(HttpStatusCode.NotFound, externalDataResult.StatusCode);
        }
Пример #3
0
        public async Task WhenQueryExternalDataWithUnknownCustomerId_ThenForbiddenShouldBeReturned()
        {
            var unknownCustomerId = 1234567;
            var client            = new ExternalSystemSetup().BuildClient();
            var exportAbsence     = await client.GetAsync($"{unknownCustomerId}/externalsystems/1/externaldata");

            Assert.NotNull(exportAbsence);
            Assert.AreEqual(HttpStatusCode.Forbidden, exportAbsence.StatusCode);
        }