public void SetFieldValue() { var testEntity = new TestEntity(new NestedEntity()); testEntity.Field("yo").SetValue("5"); Assert.AreEqual("5", testEntity.NestedEntity.Yo); Assert.AreEqual(null, testEntity.Field("bo")); }
public void Create() { TestEntity testEntity = new TestEntity(new NestedEntity()); Assert.AreEqual(2, new NestedEntities(testEntity).Count); }
public void To_String() { var nestedEntity = new NestedEntity {Yo = "7"}; var testEntity = new TestEntity(nestedEntity) {Zo = "8"}; Assert.AreEqual("zo=8, nestedEntity=yo=7, ", testEntity.ToString()); }
public void Header() { var nestedEntity = new NestedEntity(); var testEntity = new TestEntity(nestedEntity); Assert.AreEqual("ZO, YO, ", testEntity.Header); }
public void To_String() { var list = new Entities<Entity>(); var nestedEntity = new NestedEntity(); var testEntity = new TestEntity(nestedEntity); nestedEntity.Yo = "7"; testEntity.Zo = "8"; list.Add(testEntity); var builder = new StringBuilder(); builder.AppendLine("ZO, YO, "); builder.AppendLine("8, 7, "); Assert.AreEqual(builder.ToString(), list.ToString()); }