Skip to content

Commit

Permalink
Merge pull request #125 from donnytian/develop
Browse files Browse the repository at this point in the history
v6.1
  • Loading branch information
donnytian authored Sep 17, 2023
2 parents 142cb81 + e41df08 commit cf4ecac
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
- name: Build
run: dotnet build --no-restore Npoi.Mapper/Npoi.Mapper.sln
- name: Test
run: dotnet test --no-build --verbosity normal Npoi.Mapper/Npoi.Mapper.sln
run: dotnet test --framework net6.0 --no-build --verbosity normal Npoi.Mapper/Npoi.Mapper.sln
10 changes: 5 additions & 5 deletions Npoi.Mapper/src/Npoi.Mapper/Npoi.Mapper.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
<Authors>Donny Tian</Authors>
<AssemblyName>Npoi.Mapper</AssemblyName>
<PackageId>Npoi.Mapper</PackageId>
<PackageTags>Excel;XLS;XLSX;NPOI;Object mapping;dynamic</PackageTags>
<PackageTags>Excel;XLS;XLSX;NPOI;object mapping;dynamic object mapping</PackageTags>
<PackageProjectUrl>https://donnytian.github.io/Npoi.Mapper/</PackageProjectUrl>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Version>6.0</Version>
<PackageReleaseNotes>Target on net6.0 only</PackageReleaseNotes>
<Version>6.1</Version>
<PackageReleaseNotes>Support net 472 and net60</PackageReleaseNotes>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>npoi.mapper.snk</AssemblyOriginatorKeyFile>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net472;net6.0</TargetFrameworks>
<LangVersion>default</LangVersion>
</PropertyGroup>

Expand All @@ -30,7 +30,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NPOI" Version="2.6.0" />
<PackageReference Include="NPOI" Version="2.6.2" />
</ItemGroup>

<ItemGroup Label="SourceLink">
Expand Down
1 change: 0 additions & 1 deletion Npoi.Mapper/test/ExportGeneralTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.IO;
using System.Linq;
using Npoi.Mapper;
using NPOI.HSSF.UserModel;
using NPOI.SS.UserModel;
using NPOI.XSSF.UserModel;
using NUnit.Framework;
Expand Down
1 change: 0 additions & 1 deletion Npoi.Mapper/test/Extensions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using NUnit.Framework;

namespace test
{
Expand Down
7 changes: 3 additions & 4 deletions Npoi.Mapper/test/ImportDynamicTests.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Npoi.Mapper;
using NPOI.SS.UserModel;
using NUnit.Framework;
Expand Down Expand Up @@ -275,7 +272,9 @@ public void TakeDynamic_TwoSheets_WithSameHeaderName()
Assert.AreEqual(stringValue, objs1[0].Value.A);
Assert.AreEqual(intValue, objs1[0].Value.sheet1B);
Assert.AreEqual(doubleValue, objs2[0].Value.A);
Assert.AreEqual(dateTimeValue.ToOADate(), objs2[0].Value.sheet2B);
var diff = dateTimeValue.ToOADate() - objs2[0].Value.sheet2B;
const double epsilon = 0.0000000001;
Assert.IsTrue(Math.Abs(diff) < epsilon);
}
}
}
1 change: 0 additions & 1 deletion Npoi.Mapper/test/ImportGeneralTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Globalization;
using System.IO;
using System.Linq;
using NPOI.HSSF.UserModel;
using Npoi.Mapper;
using Npoi.Mapper.Attributes;
using NPOI.SS.UserModel;
Expand Down
3 changes: 0 additions & 3 deletions Npoi.Mapper/test/TestSetUp.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
using System;
using System.Diagnostics.CodeAnalysis;
using NUnit.Framework;

[assembly:ExcludeFromCodeCoverage]

namespace test
{
/// <summary>
Expand Down
13 changes: 4 additions & 9 deletions Npoi.Mapper/test/test.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net472;net6.0</TargetFrameworks>
<LangVersion>default</LangVersion>
</PropertyGroup>

Expand All @@ -16,7 +16,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0-preview-23424-02" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0">
<PrivateAssets>all</PrivateAssets>
Expand All @@ -28,12 +28,7 @@
<ProjectReference Include="..\src\Npoi.Mapper\Npoi.Mapper.csproj" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net45'">
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.ComponentModel.DataAnnotations" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net40'">
<ItemGroup Condition=" '$(TargetFramework)' == 'net472'">
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.ComponentModel.DataAnnotations" />
</ItemGroup>
Expand All @@ -42,7 +37,7 @@
<PackageReference Include="System.Reflection.Emit" Version="4.3.0" />
<PackageReference Include="System.ComponentModel.Annotations" Version="4.5.0" />
</ItemGroup>

<ItemGroup>
<None Update="Book1.xlsx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
Expand Down

0 comments on commit cf4ecac

Please sign in to comment.