Skip to content

CreateDynamicInstance from a table with a single Field and Value doesn't create the ExpandoObject as expected #18

@icnocop

Description

@icnocop

Calling CreateDynamicInstance for a table with a single Field and Value row doesn't create the ExpandoObject as expected.

To reproduce, add the following scenario in .\Specs\DynamicInstancesFromTable.feature:

Scenario: Create dynamic instance from table with a single Field and Value
	When I create a dynamic instance from this table
		| Field            | Value      |
		| Name             | Marcus     |
	Then the Name property should equal 'Marcus'

Result:

Microsoft.CSharp.RuntimeBinder.RuntimeBinderException : 'System.Dynamic.ExpandoObject' does not contain a definition for 'Name'

Instead of the ExpandoObject getting created with one property Name with a value of Marcus, the ExpandoObject is created with two properties, Field and Value, with values Name and Marcus respectively.

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions