public void TestGetDynamicChainedOne() { var tSetValue = "1"; dynamic tExpando = new ExpandoObject(); tExpando.Test = tSetValue; var tOut = Impromptu.InvokeGetChain(tExpando, "Test"); Assert.AreEqual(tSetValue, tOut); }
public void TestGetDynamicChainedWithIndexes() { var tSetValue = "1"; dynamic tExpando = Build.NewObject( Test: Build.NewObject( Test2: Build.NewList( Build.NewObject(Test3: Build.NewObject(Test4: tSetValue)) ) ) ); var tOut = Impromptu.InvokeGetChain(tExpando, "Test.Test2[0].Test3['Test4']"); Assert.AreEqual(tSetValue, tOut); }