Skip to content

Commit

Permalink
Merge branch 'release/2.0.2' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
craigfowler committed Apr 23, 2020
2 parents d1770bf + c8e22c7 commit 2b2e1d2
Show file tree
Hide file tree
Showing 21 changed files with 40 additions and 50 deletions.
8 changes: 1 addition & 7 deletions CSF.Entities/CSF.Entities.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<Authors>craigfowler</Authors>
<Title>Entity &amp; identity types</Title>
<Description>Interfaces &amp; base types to describe ORM-mapped entities and their identities.</Description>
<ReleaseVersion>2.0.1</ReleaseVersion>
<ReleaseVersion>2.0.2</ReleaseVersion>
<Version>$(ReleaseVersion)</Version>
<PackageVersion>$(ReleaseVersion)</PackageVersion>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down Expand Up @@ -49,9 +49,6 @@
<LogicalName>Strings.resx.resources</LogicalName>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Compile Remove="Identity.cs" />
</ItemGroup>
<ItemGroup>
<Compile Condition=" '$(EnableDefaultCompileItems)' == 'true' " Update="Resources\ExceptionMessages.Designer.cs">
<DependentUpon>ExceptionMessages.resx</DependentUpon>
Expand All @@ -63,7 +60,4 @@
<ItemGroup>
<Folder Include="Resources\" />
</ItemGroup>
<ItemGroup>
<None Include="Identity.cs" Condition=" '$(EnableDefaultCompileItems)' == 'true' " />
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions CSF.Entities/Identity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static class Identity
{
static readonly IGetsIdentityType identityTypeProvider = new IdentityTypeProvider();
static readonly ICreatesIdentity identityFactory = new IdentityFactory();
static readonly IUpCastsIdentity caster = new IdentityCaster();
static readonly ICastsIdentityType caster = new IdentityTypeCaster();
static readonly IParsesIdentity parser = new IdentityParser();

/// <summary>
Expand Down Expand Up @@ -69,7 +69,7 @@ public static IIdentity<TEntity> Parse<TEntity>(object value) where TEntity : IE
/// <param name="identity">The identity to convert to a different entity type.</param>
/// <typeparam name="TCast">The desired entity type.</typeparam>
/// <exception cref="InvalidCastException">If the <paramref name="identity"/> is not suitable for the entity type <typeparamref name="TCast"/>.</exception>
public static IIdentity<TCast> Cast<TCast>(this IIdentity identity)
public static IIdentity<TCast> Cast<TCast>(this IIdentity identity) where TCast : IEntity
=> caster.CastIdentity<TCast>(identity);
}
}
Expand Down
2 changes: 1 addition & 1 deletion CSF.ORM.Entities/CSF.ORM.Entities.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<Authors>craigfowler</Authors>
<Title>ORM abstractions: Entity integration</Title>
<Description>An integration between CSF.ORM and CSF.Entities, providing convenience functionality for projects which use both.</Description>
<ReleaseVersion>2.0.1</ReleaseVersion>
<ReleaseVersion>2.0.2</ReleaseVersion>
<Version>$(ReleaseVersion)</Version>
<PackageVersion>$(ReleaseVersion)</PackageVersion>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down
2 changes: 1 addition & 1 deletion CSF.ORM.NHibernate.Common/CSF.ORM.NHibernate.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<ReleaseVersion>2.0.1</ReleaseVersion>
<ReleaseVersion>2.0.2</ReleaseVersion>
<Version>$(ReleaseVersion)</Version>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\CSF-Software-OSS.snk</AssemblyOriginatorKeyFile>
Expand Down
2 changes: 1 addition & 1 deletion CSF.ORM.NHibernate4/CSF.ORM.NHibernate4.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<Authors>craigfowler</Authors>
<Title>ORM abstractions: Implementation for NHibernate 4</Title>
<Description>Implementation of the ORM abstractions for users of NHibernate version 4.x.</Description>
<ReleaseVersion>2.0.1</ReleaseVersion>
<ReleaseVersion>2.0.2</ReleaseVersion>
<Version>$(ReleaseVersion)</Version>
<PackageVersion>$(ReleaseVersion)</PackageVersion>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down
2 changes: 1 addition & 1 deletion CSF.ORM.NHibernate5/CSF.ORM.NHibernate5.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<Authors>craigfowler</Authors>
<Title>ORM abstractions: Implementation for NHibernate 5</Title>
<Description>Implementation of the ORM abstractions for users of NHibernate version 5.x.</Description>
<ReleaseVersion>2.0.1</ReleaseVersion>
<ReleaseVersion>2.0.2</ReleaseVersion>
<Version>$(ReleaseVersion)</Version>
<PackageVersion>$(ReleaseVersion)</PackageVersion>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down
5 changes: 1 addition & 4 deletions CSF.ORM.sln
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CSF.ORM.Tests", "Tests\CSF.
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{671772C1-0FCB-4B27-846D-329CBA7A1845}"
ProjectSection(SolutionItems) = preProject
Tools\build.sh = Tools\build.sh
Tools\common-vars.txt = Tools\common-vars.txt
Tools\EnableNet45BuildOnUnix.targets = Tools\EnableNet45BuildOnUnix.targets
Tools\install.sh = Tools\install.sh
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSF.ORM.Entities", "CSF.ORM.Entities\CSF.ORM.Entities.csproj", "{3EF001E2-A559-42DB-A2DB-1A8629E7486D}"
Expand Down Expand Up @@ -174,6 +171,6 @@ Global
$0.NameConventionPolicy = $4
$4.Rules = $5
$5.NamingRule = $25
version = 2.0.1
version = 2.0.2
EndGlobalSection
EndGlobal
2 changes: 1 addition & 1 deletion CSF.ORM/CSF.ORM.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<Authors>craigfowler</Authors>
<Title>ORM abstractions</Title>
<Description>Types which relate to the usage of an ORM, so that a business logic project does not need to depend upon the ORM directly.</Description>
<ReleaseVersion>2.0.1</ReleaseVersion>
<ReleaseVersion>2.0.2</ReleaseVersion>
<Version>$(ReleaseVersion)</Version>
<PackageVersion>$(ReleaseVersion)</PackageVersion>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<PackageId>CSF.PersistenceTester</PackageId>
<Title>ORM persistence tester</Title>
<Description>A utility for testing object/entity persistence when using an ORM.</Description>
<ReleaseVersion>2.0.1</ReleaseVersion>
<ReleaseVersion>2.0.2</ReleaseVersion>
<Version>$(ReleaseVersion)</Version>
<PackageVersion>$(ReleaseVersion)</PackageVersion>
<SonarQubeTestProject>false</SonarQubeTestProject>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<PackageId>CSF.PersistenceTester.NUnit</PackageId>
<Title>ORM persistence tester: NUnit integration</Title>
<Description>An integration for the ORM persistence tester and NUnit 3.x. Provides an NUnit constraint for asserting that the test passed.</Description>
<ReleaseVersion>2.0.1</ReleaseVersion>
<ReleaseVersion>2.0.2</ReleaseVersion>
<Version>$(ReleaseVersion)</Version>
<PackageVersion>$(ReleaseVersion)</PackageVersion>
<SonarQubeTestProject>false</SonarQubeTestProject>
Expand Down
2 changes: 1 addition & 1 deletion Tests/CSF.CommonTestLogic/CSF.CommonTestLogic.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<ReleaseVersion>2.0.1</ReleaseVersion>
<ReleaseVersion>2.0.2</ReleaseVersion>
<RootNamespace>CSF</RootNamespace>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Tests/CSF.Entities.Tests/CSF.Entities.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<ReleaseVersion>2.0.1</ReleaseVersion>
<ReleaseVersion>2.0.2</ReleaseVersion>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
Expand Down
22 changes: 22 additions & 0 deletions Tests/CSF.Entities.Tests/IdentityTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public void Equals_returns_false_for_two_identities_with_incompatible_entity_typ
var identity2 = new Identity<long, Person>(5);
Assert.That(identity1.Equals(identity2), Is.False);
}

[Test, AutoMoqData]
public void Equals_operator_returns_true_for_two_equal_identities()
{
Expand Down Expand Up @@ -69,6 +70,27 @@ public void Equals_operator_returns_false_for_two_identities_with_incompatible_e
Assert.That(identity1 == identity2, Is.False);
}

[Test, AutoMoqData]
public void Create_creates_identity_with_correct_value()
{
var identity = Identity.Create<Cat>(5);
Assert.That(identity.Value, Is.EqualTo(5));
}

[Test, AutoMoqData]
public void Parse_returns_identity_with_correct_value()
{
var identity = Identity.Parse<Cat>("66");
Assert.That(identity.Value, Is.EqualTo(66));
}

[Test, AutoMoqData]
public void Cast_returns_appropriate_identity()
{
var identity = new Identity<long,Animal>(5);
Assert.That(() => Identity.Cast<Cat>(identity).Value, Is.EqualTo(5));
}

[Test, AutoMoqData]
public void GetValueAsString_returns_correct_value()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<ReleaseVersion>2.0.1</ReleaseVersion>
<ReleaseVersion>2.0.2</ReleaseVersion>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<ReleaseVersion>2.0.1</ReleaseVersion>
<ReleaseVersion>2.0.2</ReleaseVersion>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
Expand Down
2 changes: 1 addition & 1 deletion Tests/CSF.ORM.Tests/CSF.ORM.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<ReleaseVersion>2.0.1</ReleaseVersion>
<ReleaseVersion>2.0.2</ReleaseVersion>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<OutputType>Library</OutputType>
<ReleaseVersion>2.0.1</ReleaseVersion>
<ReleaseVersion>2.0.2</ReleaseVersion>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<OutputType>Library</OutputType>
<ReleaseVersion>2.0.1</ReleaseVersion>
<ReleaseVersion>2.0.2</ReleaseVersion>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
Expand Down
17 changes: 0 additions & 17 deletions Tools/build.sh

This file was deleted.

2 changes: 0 additions & 2 deletions Tools/common-vars.txt

This file was deleted.

4 changes: 0 additions & 4 deletions Tools/install.sh

This file was deleted.

0 comments on commit 2b2e1d2

Please sign in to comment.