private void AssertFieldType( EntityItemFieldType fieldToAssert, string expectedFieldName, string expectedFieldValue) { Assert.AreEqual(expectedFieldName, fieldToAssert.name); Assert.AreEqual(expectedFieldValue, fieldToAssert.Value); }
private void AssertField(EntityItemFieldType fieldToAssert, string expectedFieldName, string expectedFieldValue) { Assert.AreEqual(expectedFieldName, fieldToAssert.name); if (expectedFieldValue == null) { Assert.IsNull(fieldToAssert.Value); Assert.AreEqual(StatusEnumeration.doesnotexist, fieldToAssert.status); } else { Assert.AreEqual(expectedFieldValue, fieldToAssert.Value); } }
private EntityItemFieldType CreateEntityItemFieldType(string fieldName, object fieldValue) { var newFieldType = new EntityItemFieldType() { name = fieldName }; if (fieldValue == null) { newFieldType.status = StatusEnumeration.doesnotexist; } else { newFieldType.Value = fieldValue.ToString(); } return(newFieldType); }