public void SetAndGetFieldAndTypeTest() { var entity = new EntityMember(); entity.SetField(fieldId: 555, value: "value", 888); var result = entity.GetField(555); Assert.IsInstanceOfType(result, typeof(Field)); Assert.AreEqual(result.Id, 555); Assert.AreEqual(result.Values.Count, 1); Assert.AreEqual(result.Values[0].Enum, 888); Assert.AreEqual(result.Values[0].Value, "value"); }
public void GetNullFieldTest() { var entity = new EntityMember(); entity.Fields.Add(new Field { Id = 555, Values = new List <FieldValue> { new FieldValue { Enum = 444, Value = "value" } } }); var result = entity.GetField(0); Assert.IsNull(result); }