Skip to content

Commit 0d6c8e3

Browse files
author
Boris Breidenbach
committed
Test demonstrating issue zzzprojects#629
1 parent 62b7046 commit 0d6c8e3

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using System.Collections.Generic;
2+
using FluentAssertions;
3+
using Xunit;
4+
5+
namespace System.Linq.Dynamic.Core.Tests
6+
{
7+
public class DynamicClassTest
8+
{
9+
[Fact]
10+
public void GetPropertiesWorks()
11+
{
12+
// Arrange
13+
var range = new List<object>
14+
{
15+
new { FieldName = "TestFieldName", Value = 3.14159 }
16+
};
17+
18+
// Act
19+
var rangeResult = range.AsQueryable().Select("new(FieldName as FieldName)").ToDynamicList();
20+
var item = rangeResult.FirstOrDefault();
21+
22+
var call = () => item.GetDynamicMemberNames();
23+
call.Should().NotThrow();
24+
call.Should().NotThrow();
25+
}
26+
}
27+
}

0 commit comments

Comments
 (0)