Example #1
0
 private void AssertFieldType(
     EntityItemFieldType fieldToAssert,
     string expectedFieldName,
     string expectedFieldValue)
 {
     Assert.AreEqual(expectedFieldName, fieldToAssert.name);
     Assert.AreEqual(expectedFieldValue, fieldToAssert.Value);
 }
Example #2
0
        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);
            }
        }
Example #3
0
        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);
        }