Skip to content

Commit

Permalink
CODE RUB: Code Clean Up
Browse files Browse the repository at this point in the history
  • Loading branch information
ZafarUrakov committed Apr 29, 2024
1 parent 8bcb35f commit f9360ec
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit f9360ec

Please sign in to comment.