Browse Source

Moved repository to top level folder

davidfowl/common-services
David Fowler 1 year ago
committed by Reuben Bond
parent
commit
d086d278e8
4 changed files with 14 additions and 21 deletions
  1. +1
    -2
      src/Services/Basket/Basket.API/GlobalUsings.cs
  2. +1
    -1
      src/Services/Basket/Basket.API/Repositories/RedisBasketRepository.cs
  3. +9
    -13
      src/Services/Basket/Basket.FunctionalTests/GlobalUsings.cs
  4. +3
    -5
      src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs

+ 1
- 2
src/Services/Basket/Basket.API/GlobalUsings.cs View File

@ -9,6 +9,7 @@ global using System.Threading.Tasks;
global using Basket.API.IntegrationEvents.EventHandling;
global using Basket.API.IntegrationEvents.Events;
global using Basket.API.Model;
global using Basket.API.Repositories;
global using Grpc.Core;
global using GrpcBasket;
global using Microsoft.AspNetCore.Authorization;
@ -17,8 +18,6 @@ global using Microsoft.AspNetCore.Http;
global using Microsoft.AspNetCore.Mvc;
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
global using Microsoft.eShopOnContainers.Services.Basket.API;
global using Microsoft.eShopOnContainers.Services.Basket.API.Infrastructure.Repositories;
global using Microsoft.eShopOnContainers.Services.Basket.API.IntegrationEvents.EventHandling;
global using Microsoft.eShopOnContainers.Services.Basket.API.IntegrationEvents.Events;
global using Microsoft.eShopOnContainers.Services.Basket.API.Model;


src/Services/Basket/Basket.API/Infrastructure/Repositories/RedisBasketRepository.cs → src/Services/Basket/Basket.API/Repositories/RedisBasketRepository.cs View File

@ -1,4 +1,4 @@
namespace Microsoft.eShopOnContainers.Services.Basket.API.Infrastructure.Repositories;
namespace Basket.API.Repositories;
public class RedisBasketRepository : IBasketRepository
{

+ 9
- 13
src/Services/Basket/Basket.FunctionalTests/GlobalUsings.cs View File

@ -1,23 +1,19 @@
global using Basket.FunctionalTests.Base;
global using System;
global using System.Collections.Generic;
global using System.IO;
global using System.Net.Http;
global using System.Security.Claims;
global using System.Text;
global using System.Text.Json;
global using System.Threading.Tasks;
global using Basket.FunctionalTests.Base;
global using Microsoft.AspNetCore.Builder;
global using Microsoft.AspNetCore.Hosting;
global using Microsoft.AspNetCore.Http;
global using Microsoft.AspNetCore.Routing;
global using Microsoft.AspNetCore.TestHost;
global using Microsoft.eShopOnContainers.Services.Basket.API.Infrastructure.Repositories;
global using Microsoft.eShopOnContainers.Services.Basket.API.Model;
global using Microsoft.eShopOnContainers.Services.Basket.API;
global using Microsoft.Extensions.Configuration;
global using Microsoft.Extensions.DependencyInjection;
global using Microsoft.Extensions.Logging;
global using StackExchange.Redis;
global using System.Collections.Generic;
global using System.IO;
global using System.Net.Http;
global using System.Reflection;
global using System.Security.Claims;
global using System.Text.Json;
global using System.Text;
global using System.Threading.Tasks;
global using System;
global using Xunit;

+ 3
- 5
src/Services/Basket/Basket.FunctionalTests/RedisBasketRepositoryTests.cs View File

@ -1,6 +1,4 @@

using Microsoft.Extensions.Logging.Abstractions;
using Basket.API.Repositories;
namespace Basket.FunctionalTests
{
@ -50,8 +48,8 @@ namespace Basket.FunctionalTests
RedisBasketRepository BuildBasketRepository(ConnectionMultiplexer connMux)
{
var logger = NullLoggerFactory.Instance.CreateLogger<RedisBasketRepository>();
return new RedisBasketRepository(logger, connMux);
var loggerFactory = new LoggerFactory();
return new RedisBasketRepository(loggerFactory.CreateLogger<RedisBasketRepository>(), connMux);
}
List<BasketItem> BuildBasketItems()


Loading…
Cancel
Save