diff --git a/Frends.CSV.Parse/CHANGELOG.md b/Frends.CSV.Parse/CHANGELOG.md index 4077622..ab40995 100644 --- a/Frends.CSV.Parse/CHANGELOG.md +++ b/Frends.CSV.Parse/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [1.1.2] - 2023-11-28 +### Fixed +- Fixed documentational issues and changed Jtoken result object type to dynamic. + ## [1.1.1] - 2023-11-23 ### Fixed - Fixed issue with inverted Trim option by inverting the if statement. diff --git a/Frends.CSV.Parse/Frends.CSV.Parse.UnitTests/Frends.CSV.Parse.UnitTests.csproj b/Frends.CSV.Parse/Frends.CSV.Parse.Tests/Frends.CSV.Parse.Tests.csproj similarity index 100% rename from Frends.CSV.Parse/Frends.CSV.Parse.UnitTests/Frends.CSV.Parse.UnitTests.csproj rename to Frends.CSV.Parse/Frends.CSV.Parse.Tests/Frends.CSV.Parse.Tests.csproj diff --git a/Frends.CSV.Parse/Frends.CSV.Parse.UnitTests/UnitTests.cs b/Frends.CSV.Parse/Frends.CSV.Parse.Tests/UnitTests.cs similarity index 90% rename from Frends.CSV.Parse/Frends.CSV.Parse.UnitTests/UnitTests.cs rename to Frends.CSV.Parse/Frends.CSV.Parse.Tests/UnitTests.cs index da2c4b7..9849093 100644 --- a/Frends.CSV.Parse/Frends.CSV.Parse.UnitTests/UnitTests.cs +++ b/Frends.CSV.Parse/Frends.CSV.Parse.Tests/UnitTests.cs @@ -2,7 +2,7 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Newtonsoft.Json.Linq; -namespace Frends.CSV.Parse.UnitTests; +namespace Frends.CSV.Parse.Tests; [TestClass] public class UnitTests @@ -271,27 +271,17 @@ public void TestParseTreatMissingFieldsAsNullSetToTrueNoHeaderWithColumnSpecific TreatMissingFieldsAsNulls = true }; - // The boxed type cannot be checked against Nullable so to make sure no exception gets - // thrown when TreatMissingFieldsAsNulls is set to true have to check if exception is thrown - // when trying to insert empty values in the data - try - { - var result = CSV.Parse(input, options, default); - var resultData = result.Data; - var itemArray = resultData[1]; - - Assert.IsNull(itemArray[1]); - Assert.IsNull(itemArray[2]); - Assert.IsNull(itemArray[3]); - Assert.IsNull(itemArray[4]); - Assert.IsNull(itemArray[5]); - Assert.IsNull(itemArray[6]); - Assert.IsNull(itemArray[7]); - } - catch (Exception) - { - Assert.Fail("Should not throw an exception"); - } + var result = CSV.Parse(input, options, default); + var resultData = result.Data; + var itemArray = resultData[1]; + + Assert.IsNull(itemArray[1]); + Assert.IsNull(itemArray[2]); + Assert.IsNull(itemArray[3]); + Assert.IsNull(itemArray[4]); + Assert.IsNull(itemArray[5]); + Assert.IsNull(itemArray[6]); + Assert.IsNull(itemArray[7]); } [TestMethod] diff --git a/Frends.CSV.Parse/Frends.CSV.Parse.sln b/Frends.CSV.Parse/Frends.CSV.Parse.sln index 6a42c53..1111091 100644 --- a/Frends.CSV.Parse/Frends.CSV.Parse.sln +++ b/Frends.CSV.Parse/Frends.CSV.Parse.sln @@ -1,40 +1,40 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.1.32319.34 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Frends.CSV.Parse", "Frends.CSV.Parse\Frends.CSV.Parse.csproj", "{35C305C0-8108-4A98-BB1D-AFE5C926239E}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{78F7F22E-6E20-4BCE-8362-0C558568B729}" - ProjectSection(SolutionItems) = preProject - CHANGELOG.md = CHANGELOG.md - ..\.github\workflows\Create_build_and_test_on_main.yml = ..\.github\workflows\Create_build_and_test_on_main.yml - ..\.github\workflows\Create_build_and_test_on_push.yml = ..\.github\workflows\Create_build_and_test_on_push.yml - ..\.github\workflows\Create_release.yml = ..\.github\workflows\Create_release.yml - README.md = README.md - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Frends.CSV.Parse.UnitTests", "Frends.CSV.Parse.UnitTests\Frends.CSV.Parse.UnitTests.csproj", "{01BD39F5-AAAB-47BA-A6F8-41A892532D1C}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {35C305C0-8108-4A98-BB1D-AFE5C926239E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {35C305C0-8108-4A98-BB1D-AFE5C926239E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {35C305C0-8108-4A98-BB1D-AFE5C926239E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {35C305C0-8108-4A98-BB1D-AFE5C926239E}.Release|Any CPU.Build.0 = Release|Any CPU - {01BD39F5-AAAB-47BA-A6F8-41A892532D1C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {01BD39F5-AAAB-47BA-A6F8-41A892532D1C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {01BD39F5-AAAB-47BA-A6F8-41A892532D1C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {01BD39F5-AAAB-47BA-A6F8-41A892532D1C}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {8986D685-9988-4F5F-B8D9-E42A4E44BFED} - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.1.32319.34 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Frends.CSV.Parse", "Frends.CSV.Parse\Frends.CSV.Parse.csproj", "{35C305C0-8108-4A98-BB1D-AFE5C926239E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{78F7F22E-6E20-4BCE-8362-0C558568B729}" + ProjectSection(SolutionItems) = preProject + CHANGELOG.md = CHANGELOG.md + ..\.github\workflows\Create_build_and_test_on_main.yml = ..\.github\workflows\Create_build_and_test_on_main.yml + ..\.github\workflows\Create_build_and_test_on_push.yml = ..\.github\workflows\Create_build_and_test_on_push.yml + ..\.github\workflows\Create_release.yml = ..\.github\workflows\Create_release.yml + README.md = README.md + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Frends.CSV.Parse.Tests", "Frends.CSV.Parse.Tests\Frends.CSV.Parse.Tests.csproj", "{01BD39F5-AAAB-47BA-A6F8-41A892532D1C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {35C305C0-8108-4A98-BB1D-AFE5C926239E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {35C305C0-8108-4A98-BB1D-AFE5C926239E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {35C305C0-8108-4A98-BB1D-AFE5C926239E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {35C305C0-8108-4A98-BB1D-AFE5C926239E}.Release|Any CPU.Build.0 = Release|Any CPU + {01BD39F5-AAAB-47BA-A6F8-41A892532D1C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {01BD39F5-AAAB-47BA-A6F8-41A892532D1C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {01BD39F5-AAAB-47BA-A6F8-41A892532D1C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {01BD39F5-AAAB-47BA-A6F8-41A892532D1C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {8986D685-9988-4F5F-B8D9-E42A4E44BFED} + EndGlobalSection +EndGlobal diff --git a/Frends.CSV.Parse/Frends.CSV.Parse/Definitions/Result.cs b/Frends.CSV.Parse/Frends.CSV.Parse/Definitions/Result.cs index 5a15549..416ca77 100644 --- a/Frends.CSV.Parse/Frends.CSV.Parse/Definitions/Result.cs +++ b/Frends.CSV.Parse/Frends.CSV.Parse/Definitions/Result.cs @@ -35,7 +35,7 @@ public class Result /// Result as JToken. /// /// {[ {"value": "1", "foos": "foo", "bars": "bar"} ]} - public object Jtoken { get; private set; } + public dynamic Jtoken { get; private set; } /// /// Result as XML. diff --git a/Frends.CSV.Parse/Frends.CSV.Parse/Frends.CSV.Parse.csproj b/Frends.CSV.Parse/Frends.CSV.Parse/Frends.CSV.Parse.csproj index 4012ce5..4d5773f 100644 --- a/Frends.CSV.Parse/Frends.CSV.Parse/Frends.CSV.Parse.csproj +++ b/Frends.CSV.Parse/Frends.CSV.Parse/Frends.CSV.Parse.csproj @@ -2,7 +2,7 @@ net6.0 - 1.1.1 + 1.1.2 Frends Frends Frends @@ -10,9 +10,9 @@ Frends MIT true - Frends Task to parse string CSV content to a object. + Frends Task for parsing CSV string. https://frends.com/ - https://github.com/FrendsPlatform/Frends.CSV + https://github.com/FrendsPlatform/Frends.CSV2/tree/main/Frends.CSV.Parse diff --git a/Frends.CSV.Parse/Frends.CSV.Parse/Parse.cs b/Frends.CSV.Parse/Frends.CSV.Parse/Parse.cs index 676fb2f..c910d72 100644 --- a/Frends.CSV.Parse/Frends.CSV.Parse/Parse.cs +++ b/Frends.CSV.Parse/Frends.CSV.Parse/Parse.cs @@ -20,7 +20,7 @@ namespace Frends.CSV.Parse; public class CSV { /// - /// Parse string CSV content to an object. + /// Frends Task for parsing CSV string. /// [Documentation](https://tasks.frends.com/tasks/frends-tasks/Frends.CSV.Parse) /// /// Input parameters diff --git a/Frends.CSV.Parse/README.md b/Frends.CSV.Parse/README.md index 8462d55..417cce6 100644 --- a/Frends.CSV.Parse/README.md +++ b/Frends.CSV.Parse/README.md @@ -1,8 +1,8 @@ # Frends.CSV.Parse -Frends Task to parse string CSV content to a object. +Frends Task to parse CSV string to an object. [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT) -[![Build](https://github.com/FrendsPlatform/Frends.CSV2/actions/workflows/Parse_build_and_test_on_main.yml/badge.svg)](https://github.com/FrendsPlatform/Frends.CSV/actions) +[![Build](https://github.com/FrendsPlatform/Frends.CSV2/actions/workflows/Parse_build_and_test_on_main.yml/badge.svg)](https://github.com/FrendsPlatform/Frends.CSV2/actions) ![Coverage](https://app-github-custom-badges.azurewebsites.net/Badge?key=FrendsPlatform/Frends.CSV2/Frends.CSV.Parse|main) # Installing