Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
icnocop opened this issue Oct 19, 2018 · 0 comments

Comments

@icnocop
Copy link

icnocop commented Oct 19, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant