Skip to content

Commit f8afc48

Browse files
committed
Added a fix for missing type conversion disabling instance creation
1 parent 5ead880 commit f8afc48

File tree

4 files changed

+85
-36
lines changed

4 files changed

+85
-36
lines changed

SolutionInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
[assembly: AssemblyCulture("")]
99

1010
[assembly: ComVisible(false)]
11-
[assembly: AssemblyVersion("1.3.0")]
12-
[assembly: AssemblyFileVersion("1.3.0")]
11+
[assembly: AssemblyVersion("1.3.1")]
12+
[assembly: AssemblyFileVersion("1.3.1")]

SpecFlow.Assist.Dynamic/DynamicTableHelpers.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
using System;
22
using System.Collections.Generic;
3-
using System.Diagnostics;
43
using System.Dynamic;
54
using System.Linq;
6-
using System.Runtime.Remoting.Messaging;
75
using System.Text.RegularExpressions;
86
using ImpromptuInterface;
97

@@ -35,7 +33,7 @@ public static ExpandoObject CreateDynamicInstance(this Table table, bool doTypeC
3533
if (table.Header.Count == 2 && table.RowCount > 1)
3634
{
3735
var horizontalTable = CreateHorizontalTable(table);
38-
return CreateDynamicInstance(horizontalTable.Rows[0]);
36+
return CreateDynamicInstance(horizontalTable.Rows[0], doTypeConversion);
3937
}
4038

4139
if (table.RowCount == 1)

Specs/ValueConversions.feature

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,18 @@ Scenario: There's ways to disable type conversion for instance creation
5555
And the birth date should stil be '1972-13-09'
5656
And length in meter should still be '1,96'
5757

58+
Scenario: There's ways to disable type conversion for instance creation with key/value tables
59+
When I create a dynamic instance from this table using no type conversion
60+
| Key | Value |
61+
| Name | 012345 |
62+
| Age | 044 |
63+
| Birth date | 1972-13-09 |
64+
| Length in meters | 1,96 |
65+
Then the Name value should still be '012345'
66+
And the Age value should still be '044'
67+
And the birth date should stil be '1972-13-09'
68+
And length in meter should still be '1,96'
69+
5870
Scenario: There's ways to disable type conversion for set creation
5971
When I create a set of dynamic instances from this table using no type conversion
6072
| Name | Age |

Specs/ValueConversions.feature.cs

Lines changed: 70 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)