Updated tests to use FluentAssertions 6

This commit is contained in:
Marcin Ziąbek 2021-09-18 20:59:21 +02:00
Родитель 6d333da84c
Коммит cc6d1c81c8
3 изменённых файлов: 26 добавлений и 5 удалений

Просмотреть файл

@ -63,7 +63,7 @@ namespace QuestPDF.UnitTests
});
});
structure.Should().BeEquivalentTo(expected, o => o.WithTracing().WithAutoConversion().WithStrictOrdering().IncludingAllRuntimeProperties());
structure.Should().BeEquivalentTo(expected);
}
[Test]
@ -120,7 +120,7 @@ namespace QuestPDF.UnitTests
});
});
structure.Should().BeEquivalentTo(expected, o => o.WithTracing().WithAutoConversion().WithStrictOrdering().IncludingAllRuntimeProperties());
structure.Should().BeEquivalentTo(expected);
}
[Test]
@ -174,7 +174,7 @@ namespace QuestPDF.UnitTests
});
});
structure.Should().BeEquivalentTo(expected, o => o.WithTracing().WithAutoConversion().WithStrictOrdering().IncludingAllRuntimeProperties());
structure.Should().BeEquivalentTo(expected);
}
#endregion
@ -244,7 +244,7 @@ namespace QuestPDF.UnitTests
});
});
structure.Should().BeEquivalentTo(expected, o => o.WithTracing().WithAutoConversion().WithStrictOrdering().IncludingAllRuntimeProperties().AllowingInfiniteRecursion());
structure.Should().BeEquivalentTo(expected);
}
#endregion

Просмотреть файл

@ -6,7 +6,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="FluentAssertions" Version="6.1.0" />
<PackageReference Include="Moq" Version="4.13.1" />
<PackageReference Include="nunit" Version="3.13.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.0.0" />

Просмотреть файл

@ -0,0 +1,21 @@
using FluentAssertions;
using NUnit.Framework;
namespace QuestPDF.UnitTests
{
[SetUpFixture]
public class TestsBase
{
[OneTimeSetUp]
public void RunBeforeAnyTests()
{
AssertionOptions.AssertEquivalencyUsing(options => options
.IncludingNestedObjects()
.IncludingInternalProperties()
.AllowingInfiniteRecursion()
.RespectingRuntimeTypes()
.WithTracing()
.WithStrictOrdering());
}
}
}