Skip to content

Commit

Permalink
Cleanup Riok.Mapperly.TestDependency
Browse files Browse the repository at this point in the history
  • Loading branch information
trejjam committed Jul 26, 2024
1 parent 13ea645 commit f41d395
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 36 deletions.
9 changes: 4 additions & 5 deletions test/Riok.Mapperly.TestDependency/Mapper/DateTimeMapper.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
using System;

namespace Riok.Mapperly.TestDependency.Mapper
namespace Riok.Mapperly.TestDependency.Mapper;

public static class DateTimeMapper
{
public static class DateTimeMapper
{
public static DateTimeOffset MapToDateTimeOffset(DateTime dateTime) => new(dateTime, TimeSpan.Zero);
}
public static DateTimeOffset MapToDateTimeOffset(DateTime dateTime) => new(dateTime, TimeSpan.Zero);
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,37 +13,7 @@
<!-- .NET Framework 4.8 defaults to lang version 7.3, but we want to test nullable features. These are available in 8.0.
To also use init-only properties, we upgrade to lang version 9.0, which is works, but is not officially supported. -->
<LangVersion Condition="'$(TargetFramework)' == 'net48'">9.0</LangVersion>
<IsTestProject>false</IsTestProject>
</PropertyGroup>

<ItemGroup>
<!-- Not supported in .NET Framework -->
<Using Remove="FluentAssertions"/>
</ItemGroup>

<!-- For local development, simply reference the projects. -->
<ItemGroup Condition="'$(MapperlyNugetPackageVersion)' == ''">
<ProjectReference Include="..\..\src\Riok.Mapperly\Riok.Mapperly.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\..\src\Riok.Mapperly.Abstractions\Riok.Mapperly.Abstractions.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="true" />
</ItemGroup>

<!-- In the CI pipeline, we always want to use a prebuilt nuget package version, since that nuget package will then be distributed -->
<ItemGroup Condition="'$(MapperlyNugetPackageVersion)' != ''">
<PackageReference Include="Riok.Mapperly" Version="$(MapperlyNugetPackageVersion)" PrivateAssets="all" />
</ItemGroup>

<!-- ef core tests should only run on newer .NET versions -->
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.19" Condition="'$(TargetFramework)' == 'net7.0'" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.5" Condition="'$(TargetFramework)' == 'net8.0'" />
</ItemGroup>

<!-- cannot use source generated polyfills since they require language version 11 -->
<ItemGroup Condition="'$(TargetFramework)' == 'net48'">
<PackageReference Include="System.Collections.Immutable" Version="8.0.0" />
<PackageReference Include="Portable.System.DateTimeOnly" Version="8.0.0" />
<PackageReference Include="IsExternalInit" Version="1.0.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>

0 comments on commit f41d395

Please sign in to comment.