Skip to content

Commit

Permalink
Merge pull request #7 from Zt-freak/dev
Browse files Browse the repository at this point in the history
added a few more tests
  • Loading branch information
Zt-freak authored Apr 12, 2024
2 parents d94ea00 + 8565fe6 commit 0901856
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
Expand All @@ -15,7 +15,7 @@
<PackageIcon>xwpfmapper-logo.png</PackageIcon>
<PackageId>Apodemus.$(AssemblyName)</PackageId>
<Product>Apodemus.$(AssemblyName)</Product>
<Version>1.0.1</Version>
<Version>1.0.2</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
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>net6.0;net7.0;net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ public void ItShould_MapFullDocument()

Mock<IXWPFTableRowMapper> tableRowMapperMock = new();
tableRowMapperMock
.Setup(t => t.MapDictionaryToRow(
It.IsAny<XWPFTableRow>(),
It.IsAny<IDictionary<string, object>>()
))
.Returns<XWPFTableRow, IDictionary<string, object>>((r, d) => r);
.Setup(t => t.MapDictionaryToRow(
It.IsAny<XWPFTableRow>(),
It.IsAny<IDictionary<string, object>>()
))
.Returns<XWPFTableRow, IDictionary<string, object>>((r, d) => r);
tableRowMapperMock
.Setup(t => t.MapEnumerableToRow(
It.IsAny<XWPFTableRow>(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,18 @@ public class MapParagraphTests
[Theory]
[InlineData("{{A}} dolor sit amet", "lorem ipsum dolor sit amet")]
[InlineData("{{B}} jumps over the lazy dog", "the quick brown fox jumps over the lazy dog")]
[InlineData("{{D}} at all\ntimes.", "The missile\nknows where\nit is at all\ntimes.\n")]
[InlineData("", "")]
[InlineData("ABCDEFG", "ABCDEFG")]
[InlineData("Hey guys\ndid you know\nvaporeon", "Hey guys\ndid you know\nvaporeon")]
public void ItShould_MapParagraph(string paragraphText, string expecctedText)
{
Dictionary<string, object> data = new()
{
{ "{{A}}", "lorem ipsum" },
{ "{{B}}", "the quick brown fox" },
{ "{{C}}", "het fikse aquaduct" }
{ "{{C}}", "het fikse aquaduct" },
{ "{{D}}", "The missile\nknows where\nit is" },
};

CT_P ctParagraph = new();
Expand Down
4 changes: 2 additions & 2 deletions NPOI.WordTemplateMapper/NPOI.WordTemplateMapper.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
Expand All @@ -16,7 +16,7 @@
<PackageReadmeFile>README.md</PackageReadmeFile>
<Product>Apodemus.$(AssemblyName)</Product>
<PackageId>Apodemus.$(AssemblyName)</PackageId>
<Version>1.0.1</Version>
<Version>1.0.2</Version>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 0901856

Please sign in to comment.