Skip to content

Commit

Permalink
Adjusted namespaces in EventStoreDB Application Logic an Optimistic c…
Browse files Browse the repository at this point in the history
…oncurrency execises
  • Loading branch information
oskardudycz committed May 2, 2024
1 parent 5ce1e42 commit 46acc44
Show file tree
Hide file tree
Showing 71 changed files with 173 additions and 173 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
using Xunit.Abstractions;
using Xunit.Sdk;

[assembly: TestFramework("ApplicationLogic.Marten.Tests.AssemblyFixture", "ApplicationLogic.Marten.Tests")]
[assembly: TestFramework("ApplicationLogic.EventStoreDB.Tests.AssemblyFixture", "ApplicationLogic.EventStoreDB.Tests")]
[assembly: CollectionBehavior(DisableTestParallelization = true)]

namespace ApplicationLogic.Marten.Tests;
namespace ApplicationLogic.EventStoreDB.Tests;

public sealed class AssemblyFixture : XunitTestFramework
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using ApplicationLogic.Marten.Immutable.ShoppingCarts;
using ApplicationLogic.EventStoreDB.Immutable.ShoppingCarts;
using Bogus;
using Ogooreck.API;
using Xunit;
using static Ogooreck.API.ApiSpecification;
using static ApplicationLogic.Marten.Tests.ShoppingCarts.Scenarios;
using static ApplicationLogic.Marten.Tests.ShoppingCarts.Fixtures;
using static ApplicationLogic.EventStoreDB.Tests.ShoppingCarts.Scenarios;
using static ApplicationLogic.EventStoreDB.Tests.ShoppingCarts.Fixtures;

namespace ApplicationLogic.Marten.Tests.ShoppingCarts;
namespace ApplicationLogic.EventStoreDB.Tests.ShoppingCarts;

public class AddProductItemToShoppingCartTests(ApiSpecification<Program> api):
IClassFixture<ApiSpecification<Program>>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using ApplicationLogic.Marten.Immutable.ShoppingCarts;
using ApplicationLogic.EventStoreDB.Immutable.ShoppingCarts;
using Bogus;
using Ogooreck.API;
using Xunit;
using static Ogooreck.API.ApiSpecification;
using static ApplicationLogic.Marten.Tests.ShoppingCarts.Scenarios;
using static ApplicationLogic.Marten.Tests.ShoppingCarts.Fixtures;
using static ApplicationLogic.EventStoreDB.Tests.ShoppingCarts.Scenarios;
using static ApplicationLogic.EventStoreDB.Tests.ShoppingCarts.Fixtures;

namespace ApplicationLogic.Marten.Tests.ShoppingCarts;
namespace ApplicationLogic.EventStoreDB.Tests.ShoppingCarts;

public class CancelShoppingCartTests(ApiSpecification<Program> api):
IClassFixture<ApiSpecification<Program>>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using ApplicationLogic.Marten.Immutable.ShoppingCarts;
using ApplicationLogic.EventStoreDB.Immutable.ShoppingCarts;
using Bogus;
using Ogooreck.API;
using Xunit;
using static Ogooreck.API.ApiSpecification;
using static ApplicationLogic.Marten.Tests.ShoppingCarts.Scenarios;
using static ApplicationLogic.Marten.Tests.ShoppingCarts.Fixtures;
using static ApplicationLogic.EventStoreDB.Tests.ShoppingCarts.Scenarios;
using static ApplicationLogic.EventStoreDB.Tests.ShoppingCarts.Fixtures;

namespace ApplicationLogic.Marten.Tests.ShoppingCarts;
namespace ApplicationLogic.EventStoreDB.Tests.ShoppingCarts;

public class ConfirmShoppingCartTests(ApiSpecification<Program> api):
IClassFixture<ApiSpecification<Program>>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using ApplicationLogic.Marten.Immutable.ShoppingCarts;
using ApplicationLogic.EventStoreDB.Immutable.ShoppingCarts;
using Ogooreck.API;
using static Ogooreck.API.ApiSpecification;

namespace ApplicationLogic.Marten.Tests.ShoppingCarts;
namespace ApplicationLogic.EventStoreDB.Tests.ShoppingCarts;

public static class Fixtures
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Ogooreck.API;
using Xunit;
using static Ogooreck.API.ApiSpecification;
using static ApplicationLogic.Marten.Tests.ShoppingCarts.Scenarios;
using static ApplicationLogic.Marten.Tests.ShoppingCarts.Fixtures;
using static ApplicationLogic.EventStoreDB.Tests.ShoppingCarts.Scenarios;
using static ApplicationLogic.EventStoreDB.Tests.ShoppingCarts.Fixtures;

namespace ApplicationLogic.Marten.Tests.ShoppingCarts;
namespace ApplicationLogic.EventStoreDB.Tests.ShoppingCarts;

public class OpenShoppingCartTests(ApiSpecification<Program> api):
IClassFixture<ApiSpecification<Program>>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using ApplicationLogic.Marten.Immutable.ShoppingCarts;
using ApplicationLogic.EventStoreDB.Immutable.ShoppingCarts;
using Bogus;
using Ogooreck.API;
using Xunit;
using static Ogooreck.API.ApiSpecification;
using static ApplicationLogic.Marten.Tests.ShoppingCarts.Scenarios;
using static ApplicationLogic.Marten.Tests.ShoppingCarts.Fixtures;
using static ApplicationLogic.EventStoreDB.Tests.ShoppingCarts.Scenarios;
using static ApplicationLogic.EventStoreDB.Tests.ShoppingCarts.Fixtures;

namespace ApplicationLogic.Marten.Tests.ShoppingCarts;
namespace ApplicationLogic.EventStoreDB.Tests.ShoppingCarts;

public class RemoveProductItemFromShoppingCartTests(ApiSpecification<Program> api):
IClassFixture<ApiSpecification<Program>>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace ApplicationLogic.Marten.Core.Entities;
namespace ApplicationLogic.EventStoreDB.Core.Entities;

public interface IAggregate
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace ApplicationLogic.Marten.Core.Exceptions;
namespace ApplicationLogic.EventStoreDB.Core.Exceptions;

public class NotFoundException: Exception
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using ApplicationLogic.Marten.Core.Entities;
using ApplicationLogic.EventStoreDB.Core.Entities;
using Marten;

namespace ApplicationLogic.Marten.Core.Marten;
namespace ApplicationLogic.EventStoreDB.Core.Marten;

public static class DocumentSessionExtensions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Marten;

namespace ApplicationLogic.Marten.Core.Marten;
namespace ApplicationLogic.EventStoreDB.Core.Marten;

public static class EventMappings
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using ApplicationLogic.Marten.Immutable.ShoppingCarts;

namespace ApplicationLogic.Marten.Immutable.Pricing;
namespace ApplicationLogic.EventStoreDB.Immutable.Pricing;

public interface IProductPriceCalculator
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace ApplicationLogic.Marten.Immutable.Pricing;
namespace ApplicationLogic.EventStoreDB.Immutable.Pricing;

public record PricedProductItem(
Guid ProductId,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
using ApplicationLogic.Marten.Core.Marten;
using ApplicationLogic.Marten.Immutable.Pricing;
using ApplicationLogic.EventStoreDB.Core.Marten;
using ApplicationLogic.EventStoreDB.Immutable.Pricing;
using Core.Validation;
using Marten;
using Marten.Schema.Identity;
using Microsoft.AspNetCore.Mvc;
using static Microsoft.AspNetCore.Http.TypedResults;
using static System.DateTimeOffset;

namespace ApplicationLogic.Marten.Immutable.ShoppingCarts;
namespace ApplicationLogic.EventStoreDB.Immutable.ShoppingCarts;

using static ShoppingCartService;
using static ShoppingCartCommand;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using ApplicationLogic.Marten.Core.Marten;
using ApplicationLogic.Marten.Immutable.Pricing;
using ApplicationLogic.EventStoreDB.Core.Marten;
using ApplicationLogic.EventStoreDB.Immutable.Pricing;
using Marten;

namespace ApplicationLogic.Marten.Immutable.ShoppingCarts;
namespace ApplicationLogic.EventStoreDB.Immutable.ShoppingCarts;
using static ShoppingCartEvent;

public static class Configure
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using ApplicationLogic.Marten.Immutable.Pricing;
using ApplicationLogic.EventStoreDB.Immutable.Pricing;

namespace ApplicationLogic.Marten.Immutable.ShoppingCarts;
namespace ApplicationLogic.EventStoreDB.Immutable.ShoppingCarts;
using static ShoppingCartEvent;

// EVENTS
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using ApplicationLogic.Marten.Immutable.Pricing;
using Core.Validation;
using ApplicationLogic.EventStoreDB.Immutable.Pricing;

namespace ApplicationLogic.Marten.Immutable.ShoppingCarts;
namespace ApplicationLogic.EventStoreDB.Immutable.ShoppingCarts;
using static ShoppingCartEvent;
using static ShoppingCartCommand;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace ApplicationLogic.Marten.Mixed.Pricing;
namespace ApplicationLogic.EventStoreDB.Mixed.Pricing;

public interface IProductPriceCalculator
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace ApplicationLogic.Marten.Mixed.Pricing;
namespace ApplicationLogic.EventStoreDB.Mixed.Pricing;

public class PricedProductItem
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
using ApplicationLogic.Marten.Core.Marten;
using ApplicationLogic.Marten.Mixed.Pricing;
using ApplicationLogic.EventStoreDB.Core.Marten;
using ApplicationLogic.EventStoreDB.Mixed.Pricing;
using Core.Validation;
using Marten;
using Marten.Schema.Identity;
using Microsoft.AspNetCore.Mvc;
using static Microsoft.AspNetCore.Http.TypedResults;
using static System.DateTimeOffset;

namespace ApplicationLogic.Marten.Mixed.ShoppingCarts;
namespace ApplicationLogic.EventStoreDB.Mixed.ShoppingCarts;
public static class Api
{
public static WebApplication ConfigureMixedShoppingCarts(this WebApplication app)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using ApplicationLogic.Marten.Core.Marten;
using ApplicationLogic.Marten.Mixed.Pricing;
using ApplicationLogic.EventStoreDB.Core.Marten;
using ApplicationLogic.EventStoreDB.Mixed.Pricing;
using Marten;

namespace ApplicationLogic.Marten.Mixed.ShoppingCarts;
namespace ApplicationLogic.EventStoreDB.Mixed.ShoppingCarts;
using static ShoppingCartEvent;

public static class Configure
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using ApplicationLogic.Marten.Mixed.Pricing;
using ApplicationLogic.EventStoreDB.Mixed.Pricing;

namespace ApplicationLogic.Marten.Mixed.ShoppingCarts;
namespace ApplicationLogic.EventStoreDB.Mixed.ShoppingCarts;

using static ShoppingCartEvent;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace ApplicationLogic.Marten.Mutable.Pricing;
namespace ApplicationLogic.EventStoreDB.Mutable.Pricing;

public interface IProductPriceCalculator
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace ApplicationLogic.Marten.Mutable.Pricing;
namespace ApplicationLogic.EventStoreDB.Mutable.Pricing;

public class PricedProductItem
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
using ApplicationLogic.Marten.Core.Marten;
using ApplicationLogic.Marten.Mutable.Pricing;
using ApplicationLogic.EventStoreDB.Core.Marten;
using ApplicationLogic.EventStoreDB.Mutable.Pricing;
using Core.Validation;
using Marten;
using Marten.Schema.Identity;
using Microsoft.AspNetCore.Mvc;
using static Microsoft.AspNetCore.Http.TypedResults;
using static System.DateTimeOffset;

namespace ApplicationLogic.Marten.Mutable.ShoppingCarts;
namespace ApplicationLogic.EventStoreDB.Mutable.ShoppingCarts;

public static class Api
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using ApplicationLogic.Marten.Core.Marten;
using ApplicationLogic.Marten.Mutable.Pricing;
using ApplicationLogic.EventStoreDB.Core.Marten;
using ApplicationLogic.EventStoreDB.Mutable.Pricing;
using Marten;

namespace ApplicationLogic.Marten.Mutable.ShoppingCarts;
namespace ApplicationLogic.EventStoreDB.Mutable.ShoppingCarts;
using static ShoppingCartEvent;

public static class Configure
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using ApplicationLogic.Marten.Core.Entities;
using ApplicationLogic.Marten.Mutable.Pricing;
using ApplicationLogic.EventStoreDB.Core.Entities;
using ApplicationLogic.EventStoreDB.Mutable.Pricing;

namespace ApplicationLogic.Marten.Mutable.ShoppingCarts;
namespace ApplicationLogic.EventStoreDB.Mutable.ShoppingCarts;

using static ShoppingCartEvent;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using ApplicationLogic.Marten.Core.Exceptions;
using ApplicationLogic.Marten.Immutable.ShoppingCarts;
using ApplicationLogic.Marten.Mixed.ShoppingCarts;
using ApplicationLogic.Marten.Mutable.ShoppingCarts;
using ApplicationLogic.EventStoreDB.Core.Exceptions;
using ApplicationLogic.EventStoreDB.Immutable.ShoppingCarts;
using ApplicationLogic.EventStoreDB.Mixed.ShoppingCarts;
using ApplicationLogic.EventStoreDB.Mutable.ShoppingCarts;
using Marten;
using Microsoft.AspNetCore.Diagnostics;
using Oakton;
Expand Down Expand Up @@ -68,6 +68,9 @@

return await app.RunOaktonCommands(args);

public partial class Program
namespace ApplicationLogic.EventStoreDB
{
public partial class Program
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[assembly: TestFramework("OptimisticConcurrency.Marten.Tests.AssemblyFixture", "OptimisticConcurrency.Marten.Tests")]
[assembly: CollectionBehavior(DisableTestParallelization = true)]

namespace OptimisticConcurrency.Marten.Tests;
namespace OptimisticConcurrency.EventStoreDB.Tests;

public sealed class AssemblyFixture : XunitTestFramework
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
using OptimisticConcurrency.Immutable.ShoppingCarts;
using Xunit;
using static Ogooreck.API.ApiSpecification;
using static OptimisticConcurrency.Marten.Tests.ShoppingCarts.Scenarios;
using static OptimisticConcurrency.Marten.Tests.ShoppingCarts.Fixtures;
using static OptimisticConcurrency.EventStoreDB.Tests.ShoppingCarts.Scenarios;
using static OptimisticConcurrency.EventStoreDB.Tests.ShoppingCarts.Fixtures;

namespace OptimisticConcurrency.Marten.Tests.ShoppingCarts;
namespace OptimisticConcurrency.EventStoreDB.Tests.ShoppingCarts;

public class AddProductItemToShoppingCartTests(ApiSpecification<Program> api):
IClassFixture<ApiSpecification<Program>>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
using OptimisticConcurrency.Immutable.ShoppingCarts;
using Xunit;
using static Ogooreck.API.ApiSpecification;
using static OptimisticConcurrency.Marten.Tests.ShoppingCarts.Scenarios;
using static OptimisticConcurrency.Marten.Tests.ShoppingCarts.Fixtures;
using static OptimisticConcurrency.EventStoreDB.Tests.ShoppingCarts.Scenarios;
using static OptimisticConcurrency.EventStoreDB.Tests.ShoppingCarts.Fixtures;

namespace OptimisticConcurrency.Marten.Tests.ShoppingCarts;
namespace OptimisticConcurrency.EventStoreDB.Tests.ShoppingCarts;

public class CancelShoppingCartTests(ApiSpecification<Program> api):
IClassFixture<ApiSpecification<Program>>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
using OptimisticConcurrency.Immutable.ShoppingCarts;
using Xunit;
using static Ogooreck.API.ApiSpecification;
using static OptimisticConcurrency.Marten.Tests.ShoppingCarts.Scenarios;
using static OptimisticConcurrency.Marten.Tests.ShoppingCarts.Fixtures;
using static OptimisticConcurrency.EventStoreDB.Tests.ShoppingCarts.Scenarios;
using static OptimisticConcurrency.EventStoreDB.Tests.ShoppingCarts.Fixtures;

namespace OptimisticConcurrency.Marten.Tests.ShoppingCarts;
namespace OptimisticConcurrency.EventStoreDB.Tests.ShoppingCarts;

public class ConfirmShoppingCartTests(ApiSpecification<Program> api):
IClassFixture<ApiSpecification<Program>>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using OptimisticConcurrency.Immutable.ShoppingCarts;
using static Ogooreck.API.ApiSpecification;

namespace OptimisticConcurrency.Marten.Tests.ShoppingCarts;
namespace OptimisticConcurrency.EventStoreDB.Tests.ShoppingCarts;

public static class Fixtures
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Ogooreck.API;
using Xunit;
using static Ogooreck.API.ApiSpecification;
using static OptimisticConcurrency.Marten.Tests.ShoppingCarts.Scenarios;
using static OptimisticConcurrency.Marten.Tests.ShoppingCarts.Fixtures;
using static OptimisticConcurrency.EventStoreDB.Tests.ShoppingCarts.Scenarios;
using static OptimisticConcurrency.EventStoreDB.Tests.ShoppingCarts.Fixtures;

namespace OptimisticConcurrency.Marten.Tests.ShoppingCarts;
namespace OptimisticConcurrency.EventStoreDB.Tests.ShoppingCarts;

public class OpenShoppingCartTests(ApiSpecification<Program> api):
IClassFixture<ApiSpecification<Program>>
Expand Down
Loading

0 comments on commit 46acc44

Please sign in to comment.