diff --git a/LiteCharms.Features.MidrandBooks.Tests/Fixture.cs b/LiteCharms.Features.MidrandBooks.Tests/Fixture.cs new file mode 100644 index 0000000..38c8bd7 --- /dev/null +++ b/LiteCharms.Features.MidrandBooks.Tests/Fixture.cs @@ -0,0 +1,38 @@ +using LiteCharms.Features.Extensions; +using LiteCharms.Features.MidrandBooks.Extensions; + +namespace LiteCharms.Features.MidrandBooks.Tests; + +public class Fixture : IDisposable +{ + public IConfiguration Configuration { get; set; } + + public IServiceProvider Services { get; set; } + + public IMediator Mediator { get; set; } + + public Fixture() + { + Configuration = new ConfigurationBuilder() + .SetBasePath(Directory.GetCurrentDirectory()) + .AddUserSecrets() + .AddJsonFile(Path.Combine(Directory.GetCurrentDirectory(), "appsettings.json"), optional: true, reloadOnChange: true) + .AddEnvironmentVariables() + .Build(); + + Services = new ServiceCollection() + .AddMediator() + .AddLogging() + //.AddMidrandShopServices() + .AddEmailServiceBus() + .AddGarageS3(Configuration) + .AddMidrandShopDatabase(Configuration) + .AddEmailServices(Configuration) + .AddSingleton(Configuration) + .BuildServiceProvider(); + + Mediator = Services.GetRequiredService(); + } + + public void Dispose() { } +} diff --git a/LiteCharms.Features.MidrandBooks.Tests/LiteCharms.Features.MidrandBooks.Tests.csproj b/LiteCharms.Features.MidrandBooks.Tests/LiteCharms.Features.MidrandBooks.Tests.csproj new file mode 100644 index 0000000..824c4ff --- /dev/null +++ b/LiteCharms.Features.MidrandBooks.Tests/LiteCharms.Features.MidrandBooks.Tests.csproj @@ -0,0 +1,51 @@ + + + + net10.0 + enable + enable + false + b205af96-ceef-44e1-851c-458c9fd1c437 + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + + + + + + + + + Always + + + + \ No newline at end of file diff --git a/LiteCharms.Features.MidrandBooks.Tests/appsettings.json b/LiteCharms.Features.MidrandBooks.Tests/appsettings.json new file mode 100644 index 0000000..1066af9 --- /dev/null +++ b/LiteCharms.Features.MidrandBooks.Tests/appsettings.json @@ -0,0 +1,34 @@ +{ + "BookshopS3Settings": { + "ServiceUrl": "http://192.168.1.177:30900", + "Region": "garage", + "BucketName": "bookshop", + "CdnBaseUrl": "https://bookshop.cdn.khongisa.co.za" + }, + "BookshopQuotesS3Settings": { + "ServiceUrl": "http://192.168.1.177:30900", + "Region": "garage", + "BucketName": "bookshop.quotes", + "CdnBaseUrl": "https://bookshop.quotes.cdn.khongisa.co.za" + }, + "Email": { + "Credentials": { + "Username": "shop@litecharms.co.za" + }, + "Port": 465, + "Host": "mail.litecharms.co.za", + "UseSsl": true + }, + "Monitoring": { + "ApiKey": "", + "Address": "http://aspire-dashboard-service.aspire.svc.cluster.local:18889", + "ServiceName": "LiteCharms.LeadGenerator" + }, + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/LiteCharms.Features.TechShop.Tests/LiteCharms.Features.TechShop.Tests.csproj b/LiteCharms.Features.TechShop.Tests/LiteCharms.Features.TechShop.Tests.csproj index 5c64f32..8ad847f 100644 --- a/LiteCharms.Features.TechShop.Tests/LiteCharms.Features.TechShop.Tests.csproj +++ b/LiteCharms.Features.TechShop.Tests/LiteCharms.Features.TechShop.Tests.csproj @@ -48,10 +48,4 @@ - - - Always - - - \ No newline at end of file diff --git a/LiteCharmsShared.slnx b/LiteCharmsShared.slnx index 3546fc5..7b1a9f7 100644 --- a/LiteCharmsShared.slnx +++ b/LiteCharmsShared.slnx @@ -8,6 +8,7 @@ +