diff --git a/STX.EFxceptions.SQLite.Base.Tests.Unit/Services/Foundations/SQLiteEFxceptionServiceTests.Exceptions.cs b/STX.EFxceptions.SQLite.Base.Tests.Unit/Services/Foundations/SQLiteEFxceptionServiceTests.Exceptions.cs index b725ff4..34129c6 100644 --- a/STX.EFxceptions.SQLite.Base.Tests.Unit/Services/Foundations/SQLiteEFxceptionServiceTests.Exceptions.cs +++ b/STX.EFxceptions.SQLite.Base.Tests.Unit/Services/Foundations/SQLiteEFxceptionServiceTests.Exceptions.cs @@ -42,7 +42,17 @@ public void ShouldThrowDbUpdateExceptionIfErrorCodeIsNotRecognized() .ThrowMeaningfulException(dbUpdateException)); // then - actualDbUpdateException.Should().BeEquivalentTo(expectedDbUpdateException); + actualDbUpdateException.Should() + .BeEquivalentTo( + expectation: expectedDbUpdateException, + config: options => options + .Excluding(ex => ex.TargetSite) + .Excluding(ex => ex.StackTrace) + .Excluding(ex => ex.Source) + .Excluding(ex => ex.InnerException.TargetSite) + .Excluding(ex => ex.InnerException.StackTrace) + .Excluding(ex => ex.InnerException.Source)); + this.sqliteErrorBrokerMock.Verify(broker => broker .GetErrorCode(foreignKeyConstraintConflictExceptionThrown), Times.Once()); diff --git a/STX.EFxceptions.SQLite.Base.Tests.Unit/Services/Foundations/SQLiteEFxceptionServiceTests.cs b/STX.EFxceptions.SQLite.Base.Tests.Unit/Services/Foundations/SQLiteEFxceptionServiceTests.cs index 5ca8d1c..0085dea 100644 --- a/STX.EFxceptions.SQLite.Base.Tests.Unit/Services/Foundations/SQLiteEFxceptionServiceTests.cs +++ b/STX.EFxceptions.SQLite.Base.Tests.Unit/Services/Foundations/SQLiteEFxceptionServiceTests.cs @@ -4,11 +4,11 @@ using System.Reflection; using System.Runtime.Serialization; +using Tynamix.ObjectFiller; using Microsoft.Data.Sqlite; using Moq; using STX.EFxceptions.SQLite.Base.Brokers.DbErrorBroker; using STX.EFxceptions.SQLite.Base.Services.Foundations; -using Tynamix.ObjectFiller; namespace STX.EFxceptions.SQLite.Base.Tests.Unit.Services.Foundations {