Пример #1
0
        public async Task Delete_ReturnsBadRequest_WhenUserDoesNotOwnIt()
        {
            //Arrange
            await AuthenticateAsync();
            await LoginAsync();

            await TestClient.PostAsJsonAsync(
                ApiRoutes.Announcements.Create, new CreateAnnouncementDto
            {
                Name        = "Test",
                Description = "Test",
                Type        = "Club",
                Image       = null
            });

            //Act
            var response = await TestClient.DeleteAsync(
                ApiRoutes.Announcements.Delete.Replace(
                    "{announcementId}", "99999"));

            string content = await response.Content.ReadAsStringAsync();

            dynamic errorResponse = JsonConvert.DeserializeObject <dynamic>(content);
            string  error         = errorResponse.error;

            //Assert
            response.StatusCode.Should().Be(HttpStatusCode.BadRequest);
            error.Should().NotBeNullOrEmpty();
            error.Should().BeEquivalentTo("You do not own this announcement");
        }
Пример #2
0
        public async Task Delete_ReturnsNoContent_WhenDeleted()
        {
            //Arrange
            await AuthenticateAsync();
            await LoginAsync();

            var postResponse = await TestClient.PostAsJsonAsync(
                ApiRoutes.Announcements.Create, new CreateAnnouncementDto
            {
                Name        = "Test",
                Description = "Test",
                Type        = "Club",
                Image       = null
            });

            var announcementResponse = await postResponse.Content.ReadAsAsync <AnnouncementResponse>();

            //Act
            var response = await TestClient.DeleteAsync(
                ApiRoutes.Announcements.Delete.Replace(
                    "{announcementId}", announcementResponse.Id.ToString()));

            var content = await response.Content.ReadAsStringAsync();

            //Assert
            response.StatusCode.Should().Be(HttpStatusCode.NoContent);
            content.Should().BeNullOrEmpty();
        }
        public async Task TestDeletePredicateEndpoint_ShouldReturnNoContent(string endpoint, string graph,
                                                                            string resourceCurie, string predicateCurie)
        {
            //Predicate exists
            var responseOnGetNotYesDeletedPredicate = await TestClient.GetAsync(ApiRoutes
                                                                                .NamedGraphResourceStartConcreteResourcePredicate
                                                                                .Replace("{endpoint}", endpoint)
                                                                                .Replace("{graph}", graph).Replace("{resource:regex(.+:.+)}", resourceCurie)
                                                                                .Replace("{predicate:regex(.+:.+)}", predicateCurie));

            Assert.Equal(HttpStatusCode.OK, responseOnGetNotYesDeletedPredicate.StatusCode);

            //Delete predicate
            var response =
                await TestClient.DeleteAsync(ApiRoutes.NamedGraphResourceStartConcreteResourcePredicate
                                             .Replace("{endpoint}", endpoint)
                                             .Replace("{graph}", graph).Replace("{resource:regex(.+:.+)}", resourceCurie)
                                             .Replace("{predicate:regex(.+:.+)}", predicateCurie));

            Assert.Equal(HttpStatusCode.NoContent, response.StatusCode);

            //Get resource which used to have the predicate => check if it does not anymore
            var resourceVm = await TestClient.GetAsync(ApiRoutes.NamedGraphResourcesConcreteResource
                                                       .Replace("{endpoint}", endpoint)
                                                       .Replace("{graph}", graph).Replace("{resource:regex(.+:.+)}", resourceCurie)).Result.Content
                             .ReadAsAsync <ResourceVm>();

            Assert.True(!resourceVm.Predicates.ContainsKey(predicateCurie));
        }
        public async Task LeaveEvent_WhenUserIsRegisteredAndItIsNotOrganizer_ShouldMarkActivityAsLeft()
        {
            // Arrange
            string eventId = await CreateRandomNewEvent();

            await AuthenticateAsync();

            var userId = await GetUserId();

            await TestClient.PostAsync($"UserActivity/{eventId}", null);

            // Act
            await TestClient.DeleteAsync($"UserActivity/{eventId}");

            // Assert
            var response = await TestClient.GetAsync($"UserActivity/{userId}");

            var responseString = await response.Content.ReadAsStringAsync();

            var activities = JsonConvert.DeserializeObject <IEnumerable <UserEventActivityDto> >(responseString);

            var activity = activities.SingleOrDefault(x => x.EventId == Guid.Parse(eventId));

            activity.Status
            .Should()
            .NotBeEmpty()
            .And
            .BeEquivalentTo("Left");
        }
        public async Task Delete_OneNote_ReturnDeletedNote()
        {
            // Arrange
            await AuthenticateAsync();

            var createdNote = await CreateNoteAsync(
                new CreateNoteCommand
            {
                Date      = _dateTimeRequestFake,
                Content   = _contentFake,
                ProjectId = _fakeFirstProjectId.ToString()
            });

            //Act
            var response = await TestClient.DeleteAsync(ApiRoutes.Notes.Delete.Replace("{noteId}", createdNote.Id.ToString()));

            //Assert
            Assert.Equal(HttpStatusCode.OK, response.StatusCode);
            Assert.Equal("application/json; charset=utf-8", response.Content.Headers.ContentType.ToString());

            var responseNote = await response.Content.ReadAsAsync <NoteResource>();

            Assert.Equal(createdNote.Id, responseNote.Id);
            Assert.Equal(_dateTimeRequestFake, responseNote.Date);
            Assert.Equal(_contentFake, responseNote.Content);
            Assert.Equal(_fakeFirstProjectId, responseNote.ProjectId);
        }
Пример #6
0
        public async Task GetAll_WithOnePosts_ReturnOkWithResponse()
        {
            //Arrange
            var newClient = await CreateClientAsync(CreateTestClientEntityModel());

            var request  = CreateOrderForTests(newClient.Id);
            var newOrder = await CreateOrderAsync(request);

            //Act
            var response = await TestClient.GetAsync(ApiRoutes.Orders.GetAll);

            //Assert
            response.StatusCode.Should().Be(HttpStatusCode.OK);

            List <Order> orders;

            using (var sr = new StringReader(await response.Content.ReadAsStringAsync()))
            {
                var ordersOnServer = JsonConvert.DeserializeObject <List <Order> >(sr.ReadToEnd());
                orders = ordersOnServer;
            }

            Assert.True(orders.Any(), $"{orders.Count}");

            var catOrder = await TestClient.DeleteAsync(ApiRoutes.Orders.Delete + newOrder.OrderId);

            var catClient = await TestClient.DeleteAsync(ApiRoutes.Clients.Delete + newClient.Id);

            catClient.StatusCode.Should().Be(HttpStatusCode.Accepted, "CLEAN CLIENT AFTER TEST");
            catOrder.StatusCode.Should().Be(HttpStatusCode.Accepted, "CLEAN ORDER AFTER TEST");
        }
        public async Task TestDelete()
        {
            Utilisateur utilisateur = new Utilisateur {
                Nom         = "Luzolo",
                Postnom     = "Nsambu",
                Prenom      = "Nadine",
                Sexe        = Sexe.Feminin,
                Photosrc    = "",
                Email       = "*****@*****.**",
                Username    = "******",
                Password    = "******",
                NiveauAcces = NiveauAcces.Utilisateur
            };

            HttpResponseMessage response = await TestClient.PostAsJsonAsync(route + "create", utilisateur);

            response.StatusCode.Should().Be(HttpStatusCode.OK);
            Utilisateur utilisateur1 = await response.Content.ReadAsAsync <Utilisateur>();

            HttpResponseMessage response1 = await TestClient.DeleteAsync(route + "delete?id=" + utilisateur1.Id);

            response1.StatusCode.Should().Be(HttpStatusCode.OK);

            HttpResponseMessage response2 = await TestClient.GetAsync(route + "getbyid?id=" + utilisateur1.Id);

            response2.StatusCode.Should().Be(HttpStatusCode.NotFound);
        }
        public async Task TestConfigurationInfoEndpoint_ShouldReturnOk(string endpoint)
        {
            var response =
                await TestClient.DeleteAsync(ApiRoutes.EndpointConfiguration.Replace("{endpoint}", endpoint));

            Assert.Equal(HttpStatusCode.NoContent, response.StatusCode);
        }
        public async Task Delete_ReturnsForbidden_WhenUserLoggedIn()
        {
            //Arrange
            await AuthenticateAsync();
            await LoginAsync();

            var announcementResponse = await TestClient.PostAsJsonAsync(
                ApiRoutes.Announcements.Create, new CreateAnnouncementDto
            {
                Name        = "Announcement To Report",
                Type        = "Other",
                Description = "Report",
                Image       = null
            });

            var announcementContent = await announcementResponse.Content.ReadAsAsync <AnnouncementResponse>();

            var createResponse = await TestClient.PostAsJsonAsync(
                ApiRoutes.Reports.Create.Replace("{announcementId}",
                                                 announcementContent.Id.ToString()), new CreateReportDto
            {
                ReportCause       = "Test",
                ReportDescription = "Test",
            });

            var createReportContent = createResponse.Content.ReadAsAsync <ReportResponse>();

            //Act
            var response = await TestClient.DeleteAsync(
                ApiRoutes.Reports.Delete.Replace(
                    "{reportId}", createReportContent.Id.ToString()));

            //Assert
            response.StatusCode.Should().Be(HttpStatusCode.Forbidden);
        }
        public async Task Put_WithGoodRequest_ReturnOK()
        {
            var changedData = "Changed Last Name";
            //Arrange
            var request   = CreateTestClientEntityModel();
            var newClient = await CreateClientAsync(request);

            //Act
            var newRequest = request;

            newRequest.Id       = newClient.Id;
            newRequest.LastName = changedData;
            var serializerSettings = new JsonSerializerSettings();

            serializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver();
            var myContent     = JsonConvert.SerializeObject(newRequest, serializerSettings);
            var stringContent = new StringContent(myContent, Encoding.UTF8, "application/json");

            var response = await TestClient.PutAsync(ApiRoutes.Clients.Put + newClient.Id, stringContent);

            //Assert
            response.StatusCode.Should().Be(HttpStatusCode.Accepted, "post was successful");
            Client clientOnServer;

            using (var sr = new StringReader(await response.Content.ReadAsStringAsync()))
            {
                clientOnServer = JsonConvert.DeserializeObject <Client>(sr.ReadToEnd());
            }
            clientOnServer.LastName.Should().Be(changedData, "post should changed data");

            //After
            var cat = await TestClient.DeleteAsync(ApiRoutes.Clients.Delete + newClient.Id);

            cat.StatusCode.Should().Be(HttpStatusCode.Accepted);
        }
        public async Task GetAll_WithOnePosts_ReturnNonEmptyResponse()
        {
            //Arrange
            var request = new ClientEntityModel()
            {
                Address   = "Street",
                City      = "City",
                FirstName = "Test",
                Id        = 0,
                LastName  = "Test",
                ZipCode   = "53-300"
            };
            var addedClient = await CreateClientAsync(request);

            //Act
            var response = await TestClient.GetAsync(ApiRoutes.Clients.GetAll);

            //Assert
            response.StatusCode.Should().Be(HttpStatusCode.OK);

            List <Client> clients;

            //List<Client> clientsOnServer = Serializer.Deserialize<Client>(await response.Content.ReadAsStreamAsync())
            using (var sr = new StringReader(await response.Content.ReadAsStringAsync()))
            {
                var clientsOnServer = JsonConvert.DeserializeObject <List <Client> >(sr.ReadToEnd());
                clients = clientsOnServer;
            }

            Assert.True(clients.Exists(c => c.LastName == "Test"));

            var deleteAfterTest = await TestClient.DeleteAsync(ApiRoutes.Clients.Delete + addedClient.Id);

            deleteAfterTest.StatusCode.Should().Be(HttpStatusCode.Accepted, "There is Client on DB");
        }
Пример #12
0
        public async Task RemoveCoOrganizer_WhenUserIsCoOrganizer_ShouldChangeEventRole()
        {
            // Arrange
            await AuthenticateAsync();

            var userId = await GetUserId();

            await AuthenticateAsync();

            var eventId = await CreateEvent();

            var payload = new AddCoOrganizerDto
            {
                UserId = userId
            };
            var payloadString = JsonConvert.SerializeObject(payload);
            var content       = new StringContent(payloadString, Encoding.UTF8, "application/json");
            await TestClient.PostAsync($"EventParticipantsOrganizer/{eventId}/coorganizers", content);

            // Act
            await TestClient.DeleteAsync($"EventParticipantsOrganizer/{eventId}/coorganizers/{userId}");

            // Assert
            var response = await TestClient.GetAsync($"UserActivity/{userId}");

            var responseBody = await response.Content.ReadAsStringAsync();

            var userActivities = JsonConvert.DeserializeObject <IEnumerable <UserEventActivityDto> >(responseBody);
            var activity       = userActivities.SingleOrDefault(x => x.EventId.ToString() == eventId);

            activity.Should().NotBeNull();
            activity?.Role
            .Should()
            .BeEquivalentTo("StandardParticipant");
        }
Пример #13
0
        public async Task RemoveCoOrganizer_WhenUserIsCoOrganizer_ShouldAddUserToStandardParticipants()
        {
            // Arrange
            await AuthenticateAsync();

            var userId = await GetUserId();

            await AuthenticateAsync();

            var eventId = await CreateEvent();

            var payload = new AddCoOrganizerDto
            {
                UserId = userId
            };
            var payloadString = JsonConvert.SerializeObject(payload);
            var content       = new StringContent(payloadString, Encoding.UTF8, "application/json");
            await TestClient.PostAsync($"EventParticipantsOrganizer/{eventId}/coorganizers", content);

            // Act
            await TestClient.DeleteAsync($"EventParticipantsOrganizer/{eventId}/coorganizers/{userId}");

            // Assert
            var response = await TestClient.GetAsync($"Event/{eventId}");

            var responseBody = await response.Content.ReadAsStringAsync();

            var @event = JsonConvert.DeserializeObject <EventDto>(responseBody);

            @event.Participants
            .StandardParticipants
            .SingleOrDefault(x => x.ToString() == eventId)
            .Should()
            .NotBe(userId);
        }
Пример #14
0
        public async Task RemoveCoOrganizer_WhenUserIsNotCoOrganizer_ShouldReturnBadRequest()
        {
            // Arrange
            var registerDto = new RegisterUserDto
            {
                Email    = "*****@*****.**",
                Password = "******"
            };
            var loginDto = new LoginUserDto
            {
                Email    = registerDto.Email,
                Password = registerDto.Password
            };

            await AuthenticateAsync(registerDto);

            var eventId = await CreateEvent();

            await AuthenticateAsync();

            var userId = await GetUserId();

            await TestClient.PostAsync($"UserActivity/{eventId}", null);

            await AuthenticateAsync(loginDto);

            // Act
            var response = await TestClient
                           .DeleteAsync($"EventParticipantsOrganizer/{eventId}/coorganizers/{userId}");

            // Assert
            response.StatusCode
            .Should()
            .BeEquivalentTo(HttpStatusCode.BadRequest);
        }
Пример #15
0
        public async Task RemoveCoOrganizer_WhenEventIdIsNotOrganizer_ShouldReturnBadRequest()
        {
            // Arrange
            await AuthenticateAsync();

            var coOrganizerId = await GetUserId();

            await AuthenticateAsync();

            var eventId = await CreateEvent();

            var addCoOrganizerDto = new AddCoOrganizerDto
            {
                UserId = coOrganizerId
            };
            var payload = JsonConvert.SerializeObject(addCoOrganizerDto);
            var content = new StringContent(payload, Encoding.UTF8, "application/json");
            await TestClient.PostAsync($"EventParticipantsOrganizer/{eventId}/coorganizers", content);

            await AuthenticateAsync();

            // Act
            var response = await TestClient
                           .DeleteAsync($"EventParticipantsOrganizer/{eventId}/coorganizers/{coOrganizerId}");

            // Assert
            response.StatusCode
            .Should()
            .BeEquivalentTo(HttpStatusCode.BadRequest);
        }
        public async Task TestGetById()
        {
            Utilisateur utilisateur = new Utilisateur {
                Nom         = "Luzolo",
                Postnom     = "Matanu",
                Prenom      = "Hervé",
                Sexe        = Sexe.Masculin,
                Photosrc    = "",
                Email       = "*****@*****.**",
                Username    = "******",
                Password    = "******",
                NiveauAcces = NiveauAcces.Utilisateur
            };

            HttpResponseMessage response = await TestClient.PostAsJsonAsync(route + "create", utilisateur);

            response.StatusCode.Should().Be(HttpStatusCode.OK);
            Utilisateur utilisateur1 = await response.Content.ReadAsAsync <Utilisateur>();

            HttpResponseMessage response1 = await TestClient.GetAsync(route + "getbyid?id=" + utilisateur1.Id);

            response1.StatusCode.Should().Be(HttpStatusCode.OK);
            Utilisateur u = await response1.Content.ReadAsAsync <Utilisateur>();

            u.Equals(utilisateur1).Should().BeTrue();

            HttpResponseMessage response2 = await TestClient.DeleteAsync(route + "delete?id=" + utilisateur1.Id);

            response2.StatusCode.Should().Be(HttpStatusCode.OK);

            HttpResponseMessage response3 = await TestClient.GetAsync(route + "getbyid?id=" + utilisateur1.Id);

            response3.StatusCode.Should().Be(HttpStatusCode.NotFound);
        }
Пример #17
0
        public async Task Put_WithBadRequest_ReturnCreated()
        {
            //Arrange
            var newClient = await CreateClientAsync(CreateTestClientEntityModel());

            var newOrder = await CreateOrderAsync(CreateOrderForTests(newClient.Id));

            //Act
            newOrder.IsPayed = true;
            newOrder.IsDone  = true;

            var stringContent = new StringContent("{\"isDone\" : true}", Encoding.UTF8, "application/json");
            var response      = await TestClient.PutAsync(ApiRoutes.Orders.Put + newOrder.OrderId, stringContent);

            //Assert
            response.StatusCode.Should().Be(HttpStatusCode.BadRequest);
            var editedOrder = JsonConvert.DeserializeObject <OrderEntityModel>(await response.Content.ReadAsStringAsync());

            editedOrder.IsDone.Should().Be(false);

            //After
            var cat = await TestClient.DeleteAsync(ApiRoutes.Orders.Delete + newOrder.OrderId);

            var catClient = await TestClient.DeleteAsync(ApiRoutes.Clients.Delete + newOrder.ClientId);

            cat.StatusCode.Should().Be(HttpStatusCode.Accepted);
            catClient.StatusCode.Should().Be(HttpStatusCode.Accepted);
        }
        public async Task TestDeleteResourceEndpoint_ShouldReturnNoContent(string endpoint, string graph,
                                                                           string resourceCurie)
        {
            //Resource exists
            var responseOnGetNotYesDeletedResource = await TestClient.GetAsync(ApiRoutes
                                                                               .NamedGraphResourcesConcreteResource
                                                                               .Replace("{endpoint}", endpoint)
                                                                               .Replace("{graph}", graph).Replace("{resource:regex(.+:.+)}", resourceCurie));

            Assert.Equal(HttpStatusCode.OK, responseOnGetNotYesDeletedResource.StatusCode);

            //Resource deleted
            var response =
                await TestClient.DeleteAsync(ApiRoutes.NamedGraphResourcesConcreteResource
                                             .Replace("{endpoint}", endpoint)
                                             .Replace("{graph}", graph).Replace("{resource:regex(.+:.+)}", resourceCurie));

            Assert.Equal(HttpStatusCode.NoContent, response.StatusCode);

            //Resource not found
            var responseOnGetDeletedResource = await TestClient.GetAsync(ApiRoutes.NamedGraphResourcesConcreteResource
                                                                         .Replace("{endpoint}", endpoint)
                                                                         .Replace("{graph}", graph).Replace("{resource:regex(.+:.+)}", resourceCurie));

            Assert.Equal(HttpStatusCode.NotFound, responseOnGetDeletedResource.StatusCode);
        }
Пример #19
0
        public async Task Delete_Tag()
        {
            await TestClient.PostAsJsonAsync(ApiRoutes.Tags.Create, new { tagName = "string1" });

            var response = await TestClient.DeleteAsync(ApiRoutes.Tags.Delete.Replace("{tagName}", "string1"));

            response.StatusCode.Should().Be(HttpStatusCode.NoContent);
        }
Пример #20
0
        public async Task DeleteItem_NotFound()
        {
            // Arrange

            // Act
            var response = await TestClient.DeleteAsync(Url + 1001);
            // Assert
            response.StatusCode.Should().Be(HttpStatusCode.NotFound);
        }
        public async Task ReturnNotFoundError()
        {
            // Act
            var response = await TestClient.DeleteAsync(
                new UrlFactory(ApiRoutes.Products.Delete).Create(Guid.NewGuid()));

            // Assert
            response.StatusCode.Should().Be(HttpStatusCode.NotFound);
        }
        public async void Game_on_Delete_not_found()
        {
            string id = "041538d2-0f6b-4d42-9902-02b179899539";

            await AuthenticateAsync();

            var response = await TestClient.DeleteAsync("Api/game/id?id=" + id);

            Assert.Equal(HttpStatusCode.NotFound, response.StatusCode);
        }
Пример #23
0
        public async Task DeleteItem()
        {
            // Arrange
            await TestClient.PostAsync(Url, Content);

            // Act
            var response = await TestClient.DeleteAsync(Url + 6);
            // Assert
            response.StatusCode.Should().Be(HttpStatusCode.NoContent);
        }
        public async void Game_on_Delete_success()
        {
            string id = "5d224ebf-ed51-41df-90b7-ec8c3c0bb6cd";

            await AuthenticateAsync();

            var response = await TestClient.DeleteAsync("Api/game/id?id=" + id);

            Assert.Equal(HttpStatusCode.OK, response.StatusCode);
        }
Пример #25
0
        public async Task Delete_WithoutToken_Returns401()
        {
            //Arrange

            //Act
            var response = await TestClient.DeleteAsync("/api/player/1");

            //Assert
            Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode);
        }
Пример #26
0
        public async Task RemoveParticipant_WhenUserWasRegistered_ShouldRemoveActivity()
        {
            // Arrange
            var registerOrganizerDto = new RegisterUserDto
            {
                Email    = "*****@*****.**",
                Password = "******"
            };

            await AuthenticateAsync(registerOrganizerDto);

            string eventId = await CreateEvent();

            var registerParticipantDto = new RegisterUserDto
            {
                Email    = "*****@*****.**",
                Password = "******"
            };

            await AuthenticateAsync(registerParticipantDto);

            await TestClient.PostAsync($"UserActivity/{eventId}", null);

            Guid userId = await GetUserId();

            var loginOrganizerDto = new LoginUserDto
            {
                Email    = registerOrganizerDto.Email,
                Password = registerOrganizerDto.Password
            };

            await AuthenticateAsync(loginOrganizerDto);

            // Act
            var response = await TestClient.DeleteAsync($"EventParticipantsOrganizer/{eventId}/participants/{userId}");

            // Assert
            var loginParticipantDto = new LoginUserDto
            {
                Email    = registerParticipantDto.Email,
                Password = registerParticipantDto.Password
            };

            await AuthenticateAsync(loginParticipantDto);

            response = await TestClient.GetAsync($"UserActivity/{userId}");

            var responseBody = await response.Content.ReadAsStringAsync();

            var activities = JsonConvert.DeserializeObject <IEnumerable <UserEventActivityDto> >(responseBody);
            var activity   = activities.SingleOrDefault(x => x.EventId.ToString() == eventId);

            activity.Should()
            .BeNull();
        }
        public async Task Delete_ReturnsNoContent_WhenDealerIsDeletedFromDatabase()
        {
            // Arrange
            var createdDealer = await CreateDealerAsync(Instantiate_NewDealerDto_Object());

            // Act
            var response = await TestClient.DeleteAsync(ApiRoutes.Dealers.Delete.Replace("{dealerId}", createdDealer.Id.ToString()));

            // Assert
            response.StatusCode.Should().Be(HttpStatusCode.NoContent);
        }
        public async Task DeletePoints_NoToken_Returns401()
        {
            //Arrange
            await InsertDummyData();

            //Act
            var response = await TestClient.DeleteAsync("api/points/1");

            //Assert
            Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode);
        }
Пример #29
0
        public async Task Delete_WithEmptyRequest_ReturnNotFound()
        {
            //Arrange
            var id = 1;

            //Act
            var response = await TestClient.DeleteAsync($"{ApiRoutes.Orders.Delete}{id}");

            //Assert
            response.StatusCode.Should().Be(HttpStatusCode.NotFound);
        }
Пример #30
0
        public void Delete_DeletesRecord_Returns200()
        {
            // Arrange
            string _requestUri = "http://localhost/api/boards/1001";

            // Act
            HttpResponseMessage response = TestClient.DeleteAsync(_requestUri).Result;

            // Assert
            Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);
        }