Skip to content

Commit

Permalink
Fixes for the rework
Browse files Browse the repository at this point in the history
  • Loading branch information
halgari committed Dec 19, 2023
1 parent 03b6679 commit 98cc224
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore

.idea/
*/Artifacts.*/*

# User-specific files
*.rsuser
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,16 @@
<PackageReference Include="BenchmarkDotNet" Version="0.13.11" />
</ItemGroup>

<ItemGroup>
<Compile Remove="BenchmarkDotNet.Artifacts\**" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Remove="BenchmarkDotNet.Artifacts\**" />
</ItemGroup>

<ItemGroup>
<None Remove="BenchmarkDotNet.Artifacts\**" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions src/NexusMods.EventSourcing/NexusMods.EventSourcing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="DynamicData" Version="8.3.27" />
<PackageReference Include="MemoryPack" Version="1.10.0" />
<PackageReference Include="System.Reactive" Version="6.0.0" />
<PackageReference Include="TransparentValueObjects" PrivateAssets="all" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
</ItemGroup>
Expand Down
3 changes: 0 additions & 3 deletions tests/NexusMods.EventSourcing.TestModel/FodyWeavers.xml

This file was deleted.

1 change: 0 additions & 1 deletion tests/NexusMods.EventSourcing.TestModel/Model/Mod.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using NexusMods.EventSourcing.Abstractions;
using ReactiveUI.Fody.Helpers;

namespace NexusMods.EventSourcing.TestModel.Model;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="DynamicData" Version="8.3.27" />
<PackageReference Include="MemoryPack" Version="1.10.0" />
<PackageReference Include="ReactiveUI.Fody" Version="19.5.1" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions tests/NexusMods.EventSourcing.TestModel/Services.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Microsoft.Extensions.DependencyInjection;
using NexusMods.EventSourcing.Abstractions;
using NexusMods.EventSourcing.Events;

namespace NexusMods.EventSourcing.TestModel;

Expand Down
10 changes: 5 additions & 5 deletions tests/NexusMods.EventSourcing.Tests/BasicFunctionalityTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,23 +125,23 @@ public void EntityCollectionsAreObservable()
var modId = AddMod.Create(tx, "First Mod", loadoutId);
tx.Commit();

var loadout = _ctx.Get<LoadoutRegistry>();
loadout.Loadouts.Should().NotBeEmpty();
var loadoutRegistry = _ctx.Get<LoadoutRegistry>();
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);
args.NewItems.Should().NotBeNull();
};

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]
Expand Down

0 comments on commit 98cc224

Please sign in to comment.