From e9c5b041e1217474dcf370094a5f0d406b05c260 Mon Sep 17 00:00:00 2001 From: Dmytro Hridin Date: Wed, 8 May 2019 21:25:48 +0300 Subject: [PATCH] move interface to Model folder --- .../Basket/Basket.API/Controllers/BasketController.cs | 1 - .../EventHandling/OrderStartedIntegrationEventHandler.cs | 2 +- .../ProductPriceChangedIntegrationEventHandler.cs | 1 - .../Repositories => Model}/IBasketRepository.cs | 5 ++--- .../Basket.FunctionalTests/RedisBasketRepositoryTests.cs | 5 ----- .../Basket/Basket.UnitTests/Application/BasketWebApiTest.cs | 1 - 6 files changed, 3 insertions(+), 12 deletions(-) rename src/Services/Basket/Basket.API/{Infrastructure/Repositories => Model}/IBasketRepository.cs (62%) diff --git a/src/Services/Basket/Basket.API/Controllers/BasketController.cs b/src/Services/Basket/Basket.API/Controllers/BasketController.cs index e4abe3a92..0bf15fc42 100644 --- a/src/Services/Basket/Basket.API/Controllers/BasketController.cs +++ b/src/Services/Basket/Basket.API/Controllers/BasketController.cs @@ -3,7 +3,6 @@ using Basket.API.Model; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; -using Microsoft.eShopOnContainers.Services.Basket.API.Infrastructure.Repositories; using Microsoft.eShopOnContainers.Services.Basket.API.Model; using Microsoft.eShopOnContainers.Services.Basket.API.Services; using Microsoft.Extensions.Logging; diff --git a/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/OrderStartedIntegrationEventHandler.cs b/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/OrderStartedIntegrationEventHandler.cs index 2cce760d9..cb7b6a2d6 100644 --- a/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/OrderStartedIntegrationEventHandler.cs +++ b/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/OrderStartedIntegrationEventHandler.cs @@ -1,7 +1,7 @@ using Basket.API.IntegrationEvents.Events; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; using Microsoft.eShopOnContainers.Services.Basket.API; -using Microsoft.eShopOnContainers.Services.Basket.API.Infrastructure.Repositories; +using Microsoft.eShopOnContainers.Services.Basket.API.Model; using Microsoft.Extensions.Logging; using Serilog.Context; using System; diff --git a/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/ProductPriceChangedIntegrationEventHandler.cs b/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/ProductPriceChangedIntegrationEventHandler.cs index 49714c03e..c27200e6f 100644 --- a/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/ProductPriceChangedIntegrationEventHandler.cs +++ b/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/ProductPriceChangedIntegrationEventHandler.cs @@ -1,5 +1,4 @@ using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; -using Microsoft.eShopOnContainers.Services.Basket.API.Infrastructure.Repositories; using Microsoft.eShopOnContainers.Services.Basket.API.IntegrationEvents.Events; using Microsoft.eShopOnContainers.Services.Basket.API.Model; using Microsoft.Extensions.Logging; diff --git a/src/Services/Basket/Basket.API/Infrastructure/Repositories/IBasketRepository.cs b/src/Services/Basket/Basket.API/Model/IBasketRepository.cs similarity index 62% rename from src/Services/Basket/Basket.API/Infrastructure/Repositories/IBasketRepository.cs rename to src/Services/Basket/Basket.API/Model/IBasketRepository.cs index 0aac7baee..850b5b637 100644 --- a/src/Services/Basket/Basket.API/Infrastructure/Repositories/IBasketRepository.cs +++ b/src/Services/Basket/Basket.API/Model/IBasketRepository.cs @@ -1,8 +1,7 @@ -using Microsoft.eShopOnContainers.Services.Basket.API.Model; -using System.Collections.Generic; +using System.Collections.Generic; using System.Threading.Tasks; -namespace Microsoft.eShopOnContainers.Services.Basket.API.Infrastructure.Repositories +namespace Microsoft.eShopOnContainers.Services.Basket.API.Model { public interface IBasketRepository { diff --git a/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs b/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs index 667c0b008..f3f6d196d 100644 --- a/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs +++ b/src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs @@ -1,15 +1,10 @@ using Basket.FunctionalTests.Base; -using Microsoft.eShopOnContainers.Services.Basket.API; using Microsoft.eShopOnContainers.Services.Basket.API.Infrastructure.Repositories; using Microsoft.eShopOnContainers.Services.Basket.API.Model; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Options; -using Moq; using StackExchange.Redis; -using System; using System.Collections.Generic; -using System.Text; using System.Threading.Tasks; using Xunit; diff --git a/src/Services/Basket/Basket.UnitTests/Application/BasketWebApiTest.cs b/src/Services/Basket/Basket.UnitTests/Application/BasketWebApiTest.cs index 7420ec16b..2864b8b9f 100644 --- a/src/Services/Basket/Basket.UnitTests/Application/BasketWebApiTest.cs +++ b/src/Services/Basket/Basket.UnitTests/Application/BasketWebApiTest.cs @@ -4,7 +4,6 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; using Microsoft.eShopOnContainers.Services.Basket.API.Controllers; -using Microsoft.eShopOnContainers.Services.Basket.API.Infrastructure.Repositories; using Microsoft.eShopOnContainers.Services.Basket.API.Model; using Microsoft.Extensions.Logging; using Moq;