In the case of existing property - access through property or through index should return the same value, but actually an indexer is stored in Properties and not in Object
public class ObjWithProp : Expando
{
public string SomeProp { get; set; }
}
[TestFixture]
[Ignore]
public class ExistingProps
{
[Test]
public void Given_Porp_When_SetWithIndex_Then_PropsValue()
{
//arrange
ObjWithProp obj = new ObjWithProp();
//act
obj.SomeProp = "value1";
obj["SomeProp"] = "value2";
//assert
Assert.AreEqual("value2",obj.SomeProp);
}
}
In the case of existing property - access through property or through index should return the same value, but actually an indexer is stored in Properties and not in Object