Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
<Import Project="version.props" />

<PropertyGroup>
<FluentAssertions>4.15.0</FluentAssertions>
<TestSDKVersion>15.5.0</TestSDKVersion>
<xUnitVersion>2.4.1</xUnitVersion>
<FluentAssertions>8.9.0</FluentAssertions>
<TestSDKVersion>18.3.0</TestSDKVersion>
<xUnitVersion>2.9.3</xUnitVersion>
<xUnitRunnerVersion>2.8.2</xUnitRunnerVersion>
<EffortVersion>2.2.1</EffortVersion>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit" Version="$(xUnitVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(xUnitVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(xUnitRunnerVersion)" />
<PackageReference Include="Effort.EF6" Version="$(EffortVersion)" />
</ItemGroup>

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

<ItemGroup>
<PackageReference Include="AutoMapper.Extensions.ExpressionMapping" Version="10.0.0" />
<PackageReference Include="AutoMapper.Extensions.ExpressionMapping" Version="10.1.0" />
<PackageReference Include="EntityFramework" Version="6.5.1" />
<PackageReference Include="MinVer" Version="2.3.1">
<PrivateAssets>all</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<AssemblyName>AutoMapper.Collection.Tests</AssemblyName>
<RootNamespace>AutoMapper.Collection</RootNamespace>
<IsPackable>false</IsPackable>
Expand All @@ -15,7 +15,7 @@
<PackageReference Include="FluentAssertions" Version="$(FluentAssertions)" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(TestSDKVersion)" />
<PackageReference Include="xunit" Version="$(xUnitVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(xUnitVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(xUnitRunnerVersion)" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public void TypeMap_Should_include_base_types()
var typePairs = new[]{
new TypePair(typeof(OrderDomain), typeof(OrderEf))
};
typeMap.IncludedBaseTypes.ShouldBeEquivalentTo(typePairs);
typeMap.IncludedBaseTypes.Should().BeEquivalentTo(typePairs);
}

[Fact]
Expand All @@ -33,7 +33,7 @@ public void TypeMap_Should_include_derivied_types()
new TypePair(typeof(OnlineOrderDomain), typeof(OnlineOrderEf)),
new TypePair(typeof(MailOrderDomain), typeof(MailOrderEf))
};
typeMap.IncludedDerivedTypes.ShouldBeEquivalentTo(typePairs);
typeMap.IncludedDerivedTypes.Should().BeEquivalentTo(typePairs);
}

[Fact]
Expand All @@ -52,10 +52,10 @@ public void Map_Should_ReturnOnlineOrderEf_When_ListIsOfTypeOrderEf()
OrderEf orderEf = mappedRootEf.Orders[0];

orderEf.Should().BeOfType<OnlineOrderEf>();
orderEf.Id.ShouldBeEquivalentTo(orderDomain.Id);
orderEf.Id.Should().BeEquivalentTo(orderDomain.Id);

var onlineOrderEf = (OnlineOrderEf)orderEf;
onlineOrderEf.Key.ShouldBeEquivalentTo(orderDomain.Key);
onlineOrderEf.Key.Should().BeEquivalentTo(orderDomain.Key);

// ------------------------------------------------------------- //

Expand All @@ -65,7 +65,7 @@ public void Map_Should_ReturnOnlineOrderEf_When_ListIsOfTypeOrderEf()
mapper.Map(mappedRootEf, rootDomain);

//assert again
rootDomain.OnlineOrders.Count.ShouldBeEquivalentTo(2);
rootDomain.OnlineOrders.Count.Should().Be(2);
rootDomain.OnlineOrders.Last().Should().BeOfType<OnlineOrderDomain>();

//Assert.AreSame(rootDomain.OnlineOrders.First(), orderDomain); that doesn't matter when we map from EF to Domain
Expand All @@ -88,7 +88,7 @@ public void Map_FromEfToDomain_And_AddAnOnlineOrderInTheDomainObject_And_ThenMap
OnlineOrderDomain onlineOrderDomain = mappedRootDomain.OnlineOrders[0];

onlineOrderDomain.Should().BeOfType<OnlineOrderDomain>();
onlineOrderEf.Id.ShouldBeEquivalentTo(onlineOrderEf.Id);
onlineOrderEf.Id.Should().BeEquivalentTo(onlineOrderEf.Id);

// IMPORTANT ASSERT ------------------------------------------------------------- IMPORTANT ASSERT //

Expand All @@ -107,7 +107,7 @@ public void Map_FromEfToDomain_And_AddAnOnlineOrderInTheDomainObject_And_ThenMap
OrderEf newOnlineOrderEf = rootEf.Orders.Single(orderEf => orderEf.Id == "NewOnlineOrderId");
OrderEf newMailOrderEf = rootEf.Orders.Single(orderEf => orderEf.Id == "NewMailOrderId");

rootEf.Orders.Count.ShouldBeEquivalentTo(4);
rootEf.Orders.Count.Should().Be(4);
onlineOrderEf.Should().BeSameAs(existingOnlineOrderEf);
mailOrderEf.Should().BeSameAs(existingMailOrderEf);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public void Should_Work_With_Conditionals()

mapper.Map(new[] { dto }, entityCollection);

entity.ShouldBeEquivalentTo(entityCollection[0]);
entity.Should().BeEquivalentTo(entityCollection[0]);
}

public class Client
Expand Down Expand Up @@ -251,7 +251,7 @@ public void Should_Work_With_Comparing_String_Types()

mapper.Map(new[] { dto }, entityCollection);

entity.ShouldBeEquivalentTo(entityCollection[0]);
entity.Should().BeEquivalentTo(entityCollection[0]);
}

public class Charge
Expand Down
4 changes: 2 additions & 2 deletions src/AutoMapper.Collection.Tests/OptionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public void Should_Retain_Options_Passed_In_Map()
collectionMapper.Map(dtos, items, opts => opts.Items.Add("Test", 1));
normalMapper.Map(dtos, items, opts => opts.Items.Add("Test", 1));

collectionTestValue.ShouldBeEquivalentTo(1);
normalTestValue.ShouldBeEquivalentTo(1);
collectionTestValue.Should().Be(1);
normalTestValue.Should().Be(1);
}

public class Thing
Expand Down
2 changes: 1 addition & 1 deletion src/AutoMapper.Collection/AutoMapper.Collection.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="AutoMapper" Version="[15.0.1, 17.0.0)" />
<PackageReference Include="AutoMapper" Version="[16.1.1, 17.0.0)" />
<PackageReference Include="MinVer" Version="2.3.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
2 changes: 1 addition & 1 deletion version.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project>
<PropertyGroup>
<VersionPrefix>10.0.0</VersionPrefix>
<VersionPrefix>11.0.0</VersionPrefix>
</PropertyGroup>
</Project>