diff --git a/EventSourcing.Integration.Tests/EventSourcing.Integration.Tests.csproj b/EventSourcing.Integration.Tests/EventSourcing.Integration.Tests.csproj index 35e1a5525..3ca05ce76 100644 --- a/EventSourcing.Integration.Tests/EventSourcing.Integration.Tests.csproj +++ b/EventSourcing.Integration.Tests/EventSourcing.Integration.Tests.csproj @@ -15,8 +15,6 @@ - - all diff --git a/Marten.Integration.Tests/EventStore/Aggregate/EventsAggregation.cs b/Marten.Integration.Tests/EventStore/Aggregate/EventsAggregation.cs index b03be2e04..471ccac24 100644 --- a/Marten.Integration.Tests/EventStore/Aggregate/EventsAggregation.cs +++ b/Marten.Integration.Tests/EventStore/Aggregate/EventsAggregation.cs @@ -1,5 +1,5 @@ +using FluentAssertions; using Marten.Integration.Tests.TestsInfrastructure; -using SharpTestsEx; using Xunit; namespace Marten.Integration.Tests.EventStore.Aggregate; @@ -63,9 +63,9 @@ public void GivenStreamOfEvents_WhenAggregateStreamIsCalled_ThenChangesAreApplie var issuesList = EventStore.AggregateStream(streamId)!; - issuesList.Issues.Should().Have.Count.EqualTo(1); - issuesList.Issues.Values.Single().IssueId.Should().Be.EqualTo(issue1Id); - issuesList.Issues.Values.Single().Description.Should().Be.EqualTo("Description"); + issuesList.Issues.Should().HaveCount(1); + issuesList.Issues.Values.Single().IssueId.Should().Be(issue1Id); + issuesList.Issues.Values.Single().Description.Should().Be("Description"); //2. First Issue Description Was Changed EventStore.Append(streamId, new IssueUpdated(issue1Id, "New Description")); @@ -73,9 +73,9 @@ public void GivenStreamOfEvents_WhenAggregateStreamIsCalled_ThenChangesAreApplie issuesList = EventStore.AggregateStream(streamId)!; - issuesList.Issues.Should().Have.Count.EqualTo(1); - issuesList.Issues.Values.Single().IssueId.Should().Be.EqualTo(issue1Id); - issuesList.Issues.Values.Single().Description.Should().Be.EqualTo("New Description"); + issuesList.Issues.Should().HaveCount(1); + issuesList.Issues.Values.Single().IssueId.Should().Be(issue1Id); + issuesList.Issues.Values.Single().Description.Should().Be("New Description"); //3. Two Other tasks were added EventStore.Append(streamId, new IssueCreated(Guid.NewGuid(), "Description2"), @@ -84,10 +84,10 @@ public void GivenStreamOfEvents_WhenAggregateStreamIsCalled_ThenChangesAreApplie issuesList = EventStore.AggregateStream(streamId)!; - issuesList.Issues.Should().Have.Count.EqualTo(3); + issuesList.Issues.Should().HaveCount(3); issuesList.Issues.Values.Select(t => t.Description) .Should() - .Have.SameSequenceAs("New Description", "Description2", "Description3"); + .BeEquivalentTo("New Description", "Description2", "Description3"); //4. First issue was removed EventStore.Append(streamId, new IssueRemoved(issue1Id)); @@ -95,9 +95,9 @@ public void GivenStreamOfEvents_WhenAggregateStreamIsCalled_ThenChangesAreApplie issuesList = EventStore.AggregateStream(streamId)!; - issuesList.Issues.Should().Have.Count.EqualTo(2); + issuesList.Issues.Should().HaveCount(2); issuesList.Issues.Values.Select(t => t.Description) .Should() - .Have.SameSequenceAs("Description2", "Description3"); + .BeEquivalentTo("Description2", "Description3"); } -} \ No newline at end of file +} diff --git a/Marten.Integration.Tests/EventStore/Aggregate/InlineAggregationStorage.cs b/Marten.Integration.Tests/EventStore/Aggregate/InlineAggregationStorage.cs index ea2c645df..134e27472 100644 --- a/Marten.Integration.Tests/EventStore/Aggregate/InlineAggregationStorage.cs +++ b/Marten.Integration.Tests/EventStore/Aggregate/InlineAggregationStorage.cs @@ -1,5 +1,5 @@ +using FluentAssertions; using Marten.Integration.Tests.TestsInfrastructure; -using SharpTestsEx; using Xunit; namespace Marten.Integration.Tests.EventStore.Aggregate; @@ -74,10 +74,10 @@ public void GivenEvents_WhenInlineTransformationIsApplied_ThenReturnsSameNumberO //3. Get inline aggregation var issuesListFromInlineAggregation = Session.Load(streamId)!; - issuesListFromLiveAggregation.Should().Not.Be.Null(); - issuesListFromInlineAggregation.Should().Not.Be.Null(); + issuesListFromLiveAggregation.Should().NotBeNull(); + issuesListFromInlineAggregation.Should().NotBeNull(); - issuesListFromLiveAggregation.Issues.Count.Should().Be.EqualTo(2); - issuesListFromLiveAggregation.Issues.Count.Should().Be.EqualTo(issuesListFromInlineAggregation.Issues.Count); + issuesListFromLiveAggregation.Issues.Count.Should().Be(2); + issuesListFromLiveAggregation.Issues.Count.Should().Be(issuesListFromInlineAggregation.Issues.Count); } -} \ No newline at end of file +} diff --git a/Marten.Integration.Tests/EventStore/Aggregate/OutOfOrder/OutOfOrderProjectionsTest.cs b/Marten.Integration.Tests/EventStore/Aggregate/OutOfOrder/OutOfOrderProjectionsTest.cs index 153e7b0f3..0d991157b 100644 --- a/Marten.Integration.Tests/EventStore/Aggregate/OutOfOrder/OutOfOrderProjectionsTest.cs +++ b/Marten.Integration.Tests/EventStore/Aggregate/OutOfOrder/OutOfOrderProjectionsTest.cs @@ -1,5 +1,5 @@ +using FluentAssertions; using Marten.Integration.Tests.TestsInfrastructure; -using SharpTestsEx; using Weasel.Core; using Xunit; @@ -87,10 +87,10 @@ public void GivenOutOfOrderEvents_WhenPublishedWithSetVersion_ThenLiveAggregatio //3. Get inline aggregation var issuesListFromInlineAggregation = Session.Load(streamId); - issuesListFromLiveAggregation.Should().Not.Be.Null(); - issuesListFromInlineAggregation.Should().Not.Be.Null(); + issuesListFromLiveAggregation.Should().NotBeNull(); + issuesListFromInlineAggregation.Should().NotBeNull(); - issuesListFromLiveAggregation!.Issues.Count.Should().Be.EqualTo(2); - issuesListFromLiveAggregation!.Issues.Count.Should().Be.EqualTo(issuesListFromInlineAggregation!.Issues.Count); + issuesListFromLiveAggregation!.Issues.Count.Should().Be(2); + issuesListFromLiveAggregation!.Issues.Count.Should().Be(issuesListFromInlineAggregation!.Issues.Count); } } diff --git a/Marten.Integration.Tests/EventStore/Aggregate/Reaggregation.cs b/Marten.Integration.Tests/EventStore/Aggregate/Reaggregation.cs index a83b59934..25eeb9131 100644 --- a/Marten.Integration.Tests/EventStore/Aggregate/Reaggregation.cs +++ b/Marten.Integration.Tests/EventStore/Aggregate/Reaggregation.cs @@ -1,5 +1,5 @@ +using FluentAssertions; using Marten.Integration.Tests.TestsInfrastructure; -using SharpTestsEx; using Xunit; namespace Marten.Integration.Tests.EventStore.Aggregate @@ -98,8 +98,8 @@ public void Given_When_Then() } //2. Both inline and online aggregation for the same type should be the same - issueFromV1InlineAggregation.Description.Should().Be.EqualTo("Issue 1 Updated"); - issueFromV1InlineAggregation.Description.Should().Be.EqualTo(issueFromV1OnlineAggregation.Description); + issueFromV1InlineAggregation.Description.Should().Be("Issue 1 Updated"); + issueFromV1InlineAggregation.Description.Should().Be(issueFromV1OnlineAggregation.Description); //3. Simulate change to aggregation logic NewVersion.Issue issueFromV2InlineAggregation; @@ -112,12 +112,12 @@ public void Given_When_Then() } //4. Inline aggregated snapshot won't change automatically - issueFromV2InlineAggregation.Description.Should().Be.EqualTo(issueFromV1InlineAggregation.Description); - issueFromV2InlineAggregation.Description.Should().Not.Be.EqualTo("New Logic: Issue 1 Updated"); + issueFromV2InlineAggregation.Description.Should().Be(issueFromV1InlineAggregation.Description); + issueFromV2InlineAggregation.Description.Should().NotBe("New Logic: Issue 1 Updated"); //5. But online aggregation is being applied automatically - issueFromV2OnlineAggregation.Description.Should().Not.Be.EqualTo(issueFromV1OnlineAggregation.Description); - issueFromV2OnlineAggregation.Description.Should().Be.EqualTo("New Logic: Issue 1 Updated"); + issueFromV2OnlineAggregation.Description.Should().NotBe(issueFromV1OnlineAggregation.Description); + issueFromV2OnlineAggregation.Description.Should().Be("New Logic: Issue 1 Updated"); //6. Reagregation using (var session = CreateSessionWithInlineAggregationFor()) @@ -129,9 +129,9 @@ public void Given_When_Then() var taskFromV2AfterReaggregation = session.Load(taskId)!; - taskFromV2AfterReaggregation.Description.Should().Not.Be.EqualTo(issueFromV1OnlineAggregation.Description); - taskFromV2AfterReaggregation.Description.Should().Be.EqualTo(issueFromV2OnlineAggregation.Description); - taskFromV2AfterReaggregation.Description.Should().Be.EqualTo("New Logic: Issue 1 Updated"); + taskFromV2AfterReaggregation.Description.Should().NotBe(issueFromV1OnlineAggregation.Description); + taskFromV2AfterReaggregation.Description.Should().Be(issueFromV2OnlineAggregation.Description); + taskFromV2AfterReaggregation.Description.Should().Be("New Logic: Issue 1 Updated"); //9. Check if next event would be properly applied to inline aggregation session.Events.Append(taskId, new IssueUpdated(taskId, "Completely New text")); @@ -141,7 +141,7 @@ public void Given_When_Then() using (var session = CreateSessionWithInlineAggregationFor()) { var taskFromV2NewInlineAggregation = session.Load(taskId)!; - taskFromV2NewInlineAggregation.Description.Should().Be.EqualTo("New Logic: Completely New text"); + taskFromV2NewInlineAggregation.Description.Should().Be("New Logic: Completely New text"); } } } diff --git a/Marten.Integration.Tests/EventStore/Projections/AggregationProjectionsTest.cs b/Marten.Integration.Tests/EventStore/Projections/AggregationProjectionsTest.cs index 974df418e..ea91ef80e 100644 --- a/Marten.Integration.Tests/EventStore/Projections/AggregationProjectionsTest.cs +++ b/Marten.Integration.Tests/EventStore/Projections/AggregationProjectionsTest.cs @@ -1,6 +1,6 @@ +using FluentAssertions; using Marten.Events.Aggregation; using Marten.Integration.Tests.TestsInfrastructure; -using SharpTestsEx; using Weasel.Core; using Xunit; @@ -115,13 +115,13 @@ public void GivenEvents_WhenInlineTransformationIsApplied_ThenReturnsSameNumberO var projection = Session.Query().FirstOrDefault(); - issuesListFromLiveAggregation.Should().Not.Be.Null(); - issuesListFromInlineAggregation.Should().Not.Be.Null(); - projection.Should().Not.Be.Null(); + issuesListFromLiveAggregation.Should().NotBeNull(); + issuesListFromInlineAggregation.Should().NotBeNull(); + projection.Should().NotBeNull(); - issuesListFromLiveAggregation!.Issues.Count.Should().Be.EqualTo(2); - issuesListFromInlineAggregation!.Issues.Count.Should().Be.EqualTo(2); - projection!.Descriptions.Count.Should().Be.EqualTo(2); + issuesListFromLiveAggregation!.Issues.Count.Should().Be(2); + issuesListFromInlineAggregation!.Issues.Count.Should().Be(2); + projection!.Descriptions.Count.Should().Be(2); } } diff --git a/Marten.Integration.Tests/EventStore/Stream/StreamLoading.cs b/Marten.Integration.Tests/EventStore/Stream/StreamLoading.cs index 4fdebf687..6a2426bfc 100644 --- a/Marten.Integration.Tests/EventStore/Stream/StreamLoading.cs +++ b/Marten.Integration.Tests/EventStore/Stream/StreamLoading.cs @@ -1,5 +1,5 @@ +using FluentAssertions; using Marten.Integration.Tests.TestsInfrastructure; -using SharpTestsEx; using Xunit; namespace Marten.Integration.Tests.EventStore.Stream; @@ -37,8 +37,8 @@ public void GivenExistingStream_WithOneEventWhenStreamIsLoaded_ThenItLoadsOneEve var events = EventStore.FetchStream(streamId); //Then - events.Count.Should().Be.EqualTo(1); - events.First().Version.Should().Be.EqualTo(1); + events.Count.Should().Be(1); + events.First().Version.Should().Be(1); } [Fact] @@ -54,8 +54,8 @@ public void GivenExistingStreamWithOneEvent_WhenEventIsAppended_ThenItLoadsTwoEv //Then var events = EventStore.FetchStream(streamId); - events.Count.Should().Be.EqualTo(2); - events.Last().Version.Should().Be.EqualTo(2); + events.Count.Should().Be(2); + events.Last().Version.Should().Be(2); } [Fact] @@ -69,7 +69,7 @@ public void GivenExistingStreamWithOneEvent_WhenStreamIsLoadedByEventType_ThenIt var @event = EventStore.Load(eventId); //Then - @event.Should().Not.Be.Null(); - @event.Id.Should().Be.EqualTo(eventId); + @event.Should().NotBeNull(); + @event.Id.Should().Be(eventId); } -} \ No newline at end of file +} diff --git a/Marten.Integration.Tests/EventStore/Stream/StreamLoadingFromExactState.cs b/Marten.Integration.Tests/EventStore/Stream/StreamLoadingFromExactState.cs index 9e227f94e..59f0076ea 100644 --- a/Marten.Integration.Tests/EventStore/Stream/StreamLoadingFromExactState.cs +++ b/Marten.Integration.Tests/EventStore/Stream/StreamLoadingFromExactState.cs @@ -1,5 +1,5 @@ +using FluentAssertions; using Marten.Integration.Tests.TestsInfrastructure; -using SharpTestsEx; using Xunit; namespace Marten.Integration.Tests.EventStore.Stream; @@ -41,16 +41,16 @@ public void GivenSetOfEvents_WithFetchEventsFromDifferentTimes_ThenProperSetsAre //Then var events = EventStore.FetchStream(streamId, timestamp: beforeCreateTimestamp); - events.Count.Should().Be.EqualTo(0); + events.Count.Should().Be(0); events = EventStore.FetchStream(streamId, timestamp: createTimestamp); - events.Count.Should().Be.EqualTo(1); + events.Count.Should().Be(1); events = EventStore.FetchStream(streamId, timestamp: firstUpdateTimestamp); - events.Count.Should().Be.EqualTo(2); + events.Count.Should().Be(2); events = EventStore.FetchStream(streamId, timestamp: secondUpdateTimestamp); - events.Count.Should().Be.EqualTo(4); + events.Count.Should().Be(4); } [Fact] @@ -74,25 +74,25 @@ public void GivenSetOfEvents_WithFetchEventsFromDifferentVersionNumber_ThenPrope //Then //version after create var events = EventStore.FetchStream(streamId, 1); - events.Count.Should().Be.EqualTo(1); + events.Count.Should().Be(1); //version after first update events = EventStore.FetchStream(streamId, 2); - events.Count.Should().Be.EqualTo(2); + events.Count.Should().Be(2); //even though 3 and 4 updates were append at the same time version is incremented for both of them events = EventStore.FetchStream(streamId, 3); - events.Count.Should().Be.EqualTo(3); + events.Count.Should().Be(3); events = EventStore.FetchStream(streamId, 4); - events.Count.Should().Be.EqualTo(4); + events.Count.Should().Be(4); //fetching with version equal to 0 returns the most recent state events = EventStore.FetchStream(streamId, 0); - events.Count.Should().Be.EqualTo(4); + events.Count.Should().Be(4); //providing bigger version than current doesn't throws exception - returns most recent state events = EventStore.FetchStream(streamId, 100); - events.Count.Should().Be.EqualTo(4); + events.Count.Should().Be(4); } -} \ No newline at end of file +} diff --git a/Marten.Integration.Tests/EventStore/Stream/StreamStarting.cs b/Marten.Integration.Tests/EventStore/Stream/StreamStarting.cs index 226302845..27ba3a152 100644 --- a/Marten.Integration.Tests/EventStore/Stream/StreamStarting.cs +++ b/Marten.Integration.Tests/EventStore/Stream/StreamStarting.cs @@ -1,6 +1,6 @@ +using FluentAssertions; using Marten.Exceptions; using Marten.Integration.Tests.TestsInfrastructure; -using SharpTestsEx; using Xunit; namespace Marten.Integration.Tests.EventStore.Stream; @@ -31,7 +31,7 @@ public void GivenNoEvents_WhenStreamIsStarting_ThenEventsAreSavedWithoutError() Session.SaveChanges(); - streamId.Should().Not.Be.Null(); + streamId.Should().NotBeNull(); } [Fact] @@ -41,7 +41,7 @@ public void GivenOneEvent_WhenStreamIsStarting_ThenEventsAreSavedWithoutError() var streamId = EventStore.StartStream(@event.IssueId, @event); - streamId.Should().Not.Be.Null(); + streamId.Should().NotBeNull(); Session.SaveChanges(); } @@ -74,8 +74,8 @@ public void GivenOneEvent_WhenEventsArePublishedWithStreamId_ThenEventsAreSavedW var streamState = EventStore.FetchStreamState(streamId); - streamState.Should().Not.Be.Null(); - streamState.Version.Should().Be.EqualTo(1); + streamState.Should().NotBeNull(); + streamState.Version.Should().Be(1); } [Fact] @@ -90,8 +90,8 @@ public void GivenMoreThenOneEvent_WhenStreamIsStarting_ThenEventsAreSavedWithout var streamId = EventStore.StartStream(events); - streamId.Should().Not.Be.Null(); + streamId.Should().NotBeNull(); Session.SaveChanges(); } -} \ No newline at end of file +} diff --git a/Marten.Integration.Tests/EventStore/Transformations/OneToOneEventTransformations.cs b/Marten.Integration.Tests/EventStore/Transformations/OneToOneEventTransformations.cs index a4bdf82ff..643504cb5 100644 --- a/Marten.Integration.Tests/EventStore/Transformations/OneToOneEventTransformations.cs +++ b/Marten.Integration.Tests/EventStore/Transformations/OneToOneEventTransformations.cs @@ -107,22 +107,22 @@ // //2. Get transformed events // var changeLogs = Session.Query().ToList(); // -// changeLogs.Should().Have.Count.EqualTo(events.Length); +// changeLogs.Should().HaveCount(events.Length); // // changeLogs.Select(ev => ev.IssueId) // .Should().Have.SameValuesAs(events.Select(ev => ev.IssueId)); // // changeLogs.Count(ev => ev.ChangeType == ChangeType.Creation) -// .Should().Be.EqualTo(events.OfType().Count()); +// .Should().Be(events.OfType().Count()); // // changeLogs.Count(ev => ev.ChangeType == ChangeType.Modification) -// .Should().Be.EqualTo(events.OfType().Count()); +// .Should().Be(events.OfType().Count()); // // changeLogs.Count(ev => ev.IssueId == issue1Id) -// .Should().Be.EqualTo(events.Count(ev => ev.IssueId == issue1Id)); +// .Should().Be(events.Count(ev => ev.IssueId == issue1Id)); // // changeLogs.Count(ev => ev.IssueId == issue2Id) -// .Should().Be.EqualTo(events.Count(ev => ev.IssueId == issue2Id)); +// .Should().Be(events.Count(ev => ev.IssueId == issue2Id)); // } // } // } diff --git a/Marten.Integration.Tests/General/StoreInitializationTests.cs b/Marten.Integration.Tests/General/StoreInitializationTests.cs index eef267800..3e0f2e213 100644 --- a/Marten.Integration.Tests/General/StoreInitializationTests.cs +++ b/Marten.Integration.Tests/General/StoreInitializationTests.cs @@ -1,5 +1,5 @@ +using FluentAssertions; using Npgsql; -using SharpTestsEx; using Weasel.Core; using Xunit; @@ -17,7 +17,7 @@ public void GivenWrongConnectionString_WhenDocumentSessionIsInitialized_ThenConn ConnectionShouldBeEstablished(store); }); - ex.Should().Not.Be.Null(); + ex.Should().NotBeNull(); } [Fact] @@ -30,7 +30,7 @@ public void GivenProperConnectionString_WhenDocumentSessionIsInitialized_ThenCon ConnectionShouldBeEstablished(store); }); - ex.Should().Be.Null(); + ex.Should().BeNull(); } [Fact] @@ -48,7 +48,7 @@ public void GivenProperConnectionString_WhenDocumentSessionIsInitializedWithDiff ConnectionShouldBeEstablished(store); }); - ex.Should().Be.Null(); + ex.Should().BeNull(); } [Fact] @@ -66,7 +66,7 @@ public void GivenSettingWithNpgsqlConnection_WhenDocumentSessionIsInitializedWit ConnectionShouldBeEstablished(store); }); - ex.Should().Be.Null(); + ex.Should().BeNull(); } [Fact(Skip = "To investigate in Npgsql")] @@ -88,7 +88,7 @@ public void GivenProperConnectionString_WhenDocumentSessionIsCreatedAndTransacti transaction.Rollback(); }); - ex.Should().Be.Null(); + ex.Should().BeNull(); } private static void ConnectionShouldBeEstablished(IDocumentStore store) @@ -97,7 +97,7 @@ private static void ConnectionShouldBeEstablished(IDocumentStore store) { var result = session.Query("SELECT 1"); - result.Should().Not.Be.Null(); + result.Should().NotBeNull(); } } } diff --git a/Marten.Integration.Tests/Marten.Integration.Tests.csproj b/Marten.Integration.Tests/Marten.Integration.Tests.csproj index 7259cea72..8a4bed4c2 100644 --- a/Marten.Integration.Tests/Marten.Integration.Tests.csproj +++ b/Marten.Integration.Tests/Marten.Integration.Tests.csproj @@ -19,7 +19,6 @@ - all diff --git a/MediatR.Tests/Initialization/Initialization.cs b/MediatR.Tests/Initialization/Initialization.cs index 943c4d0dc..913f02737 100644 --- a/MediatR.Tests/Initialization/Initialization.cs +++ b/MediatR.Tests/Initialization/Initialization.cs @@ -1,4 +1,4 @@ -using SharpTestsEx; +using FluentAssertions; using Xunit; namespace MediatR.Tests.Initialization; @@ -27,10 +27,10 @@ public void GivenProperParams_WhenObjectIsCreated_ThenIsCreatedProperly() //When var mediator = new Mediator(type => ServiceLocator.Get(type).Single()); - mediator.Should().Not.Be.Null(); + mediator.Should().NotBeNull(); }); //Then - ex.Should().Be.Null(); + ex.Should().BeNull(); } -} \ No newline at end of file +} diff --git a/MediatR.Tests/MediatR.Tests.csproj b/MediatR.Tests/MediatR.Tests.csproj index b3865b6cf..11cbd04f3 100644 --- a/MediatR.Tests/MediatR.Tests.csproj +++ b/MediatR.Tests/MediatR.Tests.csproj @@ -18,8 +18,6 @@ - - all diff --git a/MediatR.Tests/Publishing/MoreThanOneHandler.cs b/MediatR.Tests/Publishing/MoreThanOneHandler.cs index 8e3518144..24df53025 100644 --- a/MediatR.Tests/Publishing/MoreThanOneHandler.cs +++ b/MediatR.Tests/Publishing/MoreThanOneHandler.cs @@ -1,4 +1,4 @@ -using SharpTestsEx; +using FluentAssertions; using Xunit; namespace MediatR.Tests.Publishing; @@ -78,7 +78,7 @@ public async void GivenTwoHandlersForOneEvent_WhenPublishMethodIsBeingCalled_The await mediator.Publish(@event); //Then - issuesList.Issues.Count.Should().Be.EqualTo(2); - issuesList.Issues.Should().Have.SameValuesAs("cleaning", "cleaning"); + issuesList.Issues.Count.Should().Be(2); + issuesList.Issues.Should().BeEquivalentTo("cleaning", "cleaning"); } -} \ No newline at end of file +} diff --git a/MediatR.Tests/Publishing/NoHandlers.cs b/MediatR.Tests/Publishing/NoHandlers.cs index c22d00ceb..a11cceaef 100644 --- a/MediatR.Tests/Publishing/NoHandlers.cs +++ b/MediatR.Tests/Publishing/NoHandlers.cs @@ -1,4 +1,4 @@ -using SharpTestsEx; +using FluentAssertions; using Xunit; namespace MediatR.Tests.Publishing; @@ -54,6 +54,6 @@ public async void GivenNonRegisteredQueryHandler_WhenPublishMethodIsBeingCalled_ }); //Then - ex.Should().Not.Be.Null(); + ex.Should().NotBeNull(); } } diff --git a/MediatR.Tests/Publishing/SingleHandler.cs b/MediatR.Tests/Publishing/SingleHandler.cs index 6d5cac554..b9230fc21 100644 --- a/MediatR.Tests/Publishing/SingleHandler.cs +++ b/MediatR.Tests/Publishing/SingleHandler.cs @@ -1,4 +1,4 @@ -using SharpTestsEx; +using FluentAssertions; using Xunit; namespace MediatR.Tests.Publishing; @@ -79,7 +79,7 @@ public async void GivenRegisteredAsynchronousRequestHandler_WhenPublishMethodIsB await mediator.Publish(@event); //Then - issuesList.Issues.Should().Have.Count.EqualTo(1); - issuesList.Issues.Should().Have.SameValuesAs("cleaning"); + issuesList.Issues.Should().HaveCount(1); + issuesList.Issues.Should().BeEquivalentTo("cleaning"); } -} \ No newline at end of file +} diff --git a/MediatR.Tests/Sending/MoreThanOneHandler.cs b/MediatR.Tests/Sending/MoreThanOneHandler.cs index 3a2573c3e..3ad2ab9eb 100644 --- a/MediatR.Tests/Sending/MoreThanOneHandler.cs +++ b/MediatR.Tests/Sending/MoreThanOneHandler.cs @@ -1,4 +1,4 @@ -using SharpTestsEx; +using FluentAssertions; using Xunit; namespace MediatR.Tests.Sending; @@ -79,7 +79,7 @@ public async void GivenTwoHandlersForOneCommand_WhenSendMethodIsBeingCalled_Then await mediator.Send(query); //Then - issuesList.Issues.Count.Should().Be.EqualTo(1); - issuesList.Issues.Should().Have.SameValuesAs("cleaning"); + issuesList.Issues.Count.Should().Be(1); + issuesList.Issues.Should().BeEquivalentTo("cleaning"); } -} \ No newline at end of file +} diff --git a/MediatR.Tests/Sending/NoHandlers.cs b/MediatR.Tests/Sending/NoHandlers.cs index 4c184142e..9a17b07b8 100644 --- a/MediatR.Tests/Sending/NoHandlers.cs +++ b/MediatR.Tests/Sending/NoHandlers.cs @@ -1,4 +1,4 @@ -using SharpTestsEx; +using FluentAssertions; using Xunit; namespace MediatR.Tests.Sending; @@ -7,7 +7,7 @@ public class NoHandlers { public class ServiceLocator { - private readonly Dictionary> services = new Dictionary>(); + private readonly Dictionary> services = new(); public void Register(Type type, params object[] implementations) => services.Add(type, implementations.ToList()); @@ -54,6 +54,6 @@ public async void GivenNonRegisteredQueryHandler_WhenSendMethodIsBeingCalled_The }); //Then - ex.Should().Not.Be.Null(); + ex.Should().NotBeNull(); } } diff --git a/MediatR.Tests/Sending/SingleHandler.cs b/MediatR.Tests/Sending/SingleHandler.cs index 6e455ee55..d988c0d29 100644 --- a/MediatR.Tests/Sending/SingleHandler.cs +++ b/MediatR.Tests/Sending/SingleHandler.cs @@ -1,4 +1,4 @@ -using SharpTestsEx; +using FluentAssertions; using Xunit; namespace MediatR.Tests.Sending; @@ -7,7 +7,7 @@ public class SingleHandler { public class ServiceLocator { - private readonly Dictionary> services = new Dictionary>(); + private readonly Dictionary> services = new(); public void Register(Type type, params object[] implementations) => services.Add(type, implementations.ToList()); @@ -80,7 +80,7 @@ public async void GivenRegisteredAsynchronousRequestHandler_WhenSendMethodIsBein var result = await mediator.Send(query); //Then - result.Should().Have.Count.EqualTo(2); - result.Should().Have.SameValuesAs("Cleaning main room", "cleaning kitchen"); + result.Should().HaveCount(2); + result.Should().BeEquivalentTo("Cleaning main room", "cleaning kitchen"); } -} \ No newline at end of file +}