From 98cc2245d7814b58c7b0d18044eb1f55f5182dc7 Mon Sep 17 00:00:00 2001 From: Timothy Baldridge Date: Tue, 19 Dec 2023 13:41:12 -0700 Subject: [PATCH] Fixes for the rework --- .gitignore | 1 + .../NexusMods.EventSourcing.Benchmarks.csproj | 12 ++++++++++++ .../NexusMods.EventSourcing.csproj | 1 + .../FodyWeavers.xml | 3 --- tests/NexusMods.EventSourcing.TestModel/Model/Mod.cs | 1 - .../NexusMods.EventSourcing.TestModel.csproj | 2 -- tests/NexusMods.EventSourcing.TestModel/Services.cs | 1 + .../BasicFunctionalityTests.cs | 10 +++++----- 8 files changed, 20 insertions(+), 11 deletions(-) delete mode 100644 tests/NexusMods.EventSourcing.TestModel/FodyWeavers.xml diff --git a/.gitignore b/.gitignore index 29156ef1..33eb133c 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ ## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore .idea/ +*/Artifacts.*/* # User-specific files *.rsuser diff --git a/benchmarks/NexusMods.EventSourcing.Benchmarks/NexusMods.EventSourcing.Benchmarks.csproj b/benchmarks/NexusMods.EventSourcing.Benchmarks/NexusMods.EventSourcing.Benchmarks.csproj index f7d0f8f6..18831252 100644 --- a/benchmarks/NexusMods.EventSourcing.Benchmarks/NexusMods.EventSourcing.Benchmarks.csproj +++ b/benchmarks/NexusMods.EventSourcing.Benchmarks/NexusMods.EventSourcing.Benchmarks.csproj @@ -19,4 +19,16 @@ + + + + + + + + + + + + diff --git a/src/NexusMods.EventSourcing/NexusMods.EventSourcing.csproj b/src/NexusMods.EventSourcing/NexusMods.EventSourcing.csproj index 3d8fa16f..89c56137 100644 --- a/src/NexusMods.EventSourcing/NexusMods.EventSourcing.csproj +++ b/src/NexusMods.EventSourcing/NexusMods.EventSourcing.csproj @@ -4,6 +4,7 @@ + diff --git a/tests/NexusMods.EventSourcing.TestModel/FodyWeavers.xml b/tests/NexusMods.EventSourcing.TestModel/FodyWeavers.xml deleted file mode 100644 index 63fc1484..00000000 --- a/tests/NexusMods.EventSourcing.TestModel/FodyWeavers.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/tests/NexusMods.EventSourcing.TestModel/Model/Mod.cs b/tests/NexusMods.EventSourcing.TestModel/Model/Mod.cs index 3ae0c9e1..0cede3c3 100644 --- a/tests/NexusMods.EventSourcing.TestModel/Model/Mod.cs +++ b/tests/NexusMods.EventSourcing.TestModel/Model/Mod.cs @@ -1,5 +1,4 @@ using NexusMods.EventSourcing.Abstractions; -using ReactiveUI.Fody.Helpers; namespace NexusMods.EventSourcing.TestModel.Model; diff --git a/tests/NexusMods.EventSourcing.TestModel/NexusMods.EventSourcing.TestModel.csproj b/tests/NexusMods.EventSourcing.TestModel/NexusMods.EventSourcing.TestModel.csproj index 063d7dd1..d7f4a94f 100644 --- a/tests/NexusMods.EventSourcing.TestModel/NexusMods.EventSourcing.TestModel.csproj +++ b/tests/NexusMods.EventSourcing.TestModel/NexusMods.EventSourcing.TestModel.csproj @@ -12,9 +12,7 @@ - - diff --git a/tests/NexusMods.EventSourcing.TestModel/Services.cs b/tests/NexusMods.EventSourcing.TestModel/Services.cs index 326fe000..80395a81 100644 --- a/tests/NexusMods.EventSourcing.TestModel/Services.cs +++ b/tests/NexusMods.EventSourcing.TestModel/Services.cs @@ -1,5 +1,6 @@ using Microsoft.Extensions.DependencyInjection; using NexusMods.EventSourcing.Abstractions; +using NexusMods.EventSourcing.Events; namespace NexusMods.EventSourcing.TestModel; diff --git a/tests/NexusMods.EventSourcing.Tests/BasicFunctionalityTests.cs b/tests/NexusMods.EventSourcing.Tests/BasicFunctionalityTests.cs index 0a6965e9..8e23dc4a 100644 --- a/tests/NexusMods.EventSourcing.Tests/BasicFunctionalityTests.cs +++ b/tests/NexusMods.EventSourcing.Tests/BasicFunctionalityTests.cs @@ -125,11 +125,11 @@ public void EntityCollectionsAreObservable() var modId = AddMod.Create(tx, "First Mod", loadoutId); tx.Commit(); - var loadout = _ctx.Get(); - loadout.Loadouts.Should().NotBeEmpty(); + var loadoutRegistry = _ctx.Get(); + loadoutRegistry.Loadouts.Should().NotBeEmpty(); var called = false; - ((INotifyCollectionChanged)loadout.Loadouts).CollectionChanged += (sender, args) => + ((INotifyCollectionChanged)loadoutRegistry.Loadouts).CollectionChanged += (sender, args) => { called = true; args.Action.Should().Be(NotifyCollectionChangedAction.Add); @@ -137,11 +137,11 @@ public void EntityCollectionsAreObservable() }; using var tx2 = _ctx.Begin(); - var modId2 = AddMod.Create(tx2, "Second Mod", loadoutId); + var loadout2Id = CreateLoadout.Create(tx2, "Test 2"); tx2.Commit(); called.Should().BeTrue(); - loadout.Loadouts.Should().NotBeEmpty(); + loadoutRegistry.Loadouts.Should().NotBeEmpty(); } [Fact]