Beispiel #1
0
        public void CheckPropertyIsRequired_ShouldReturnFalse_WhenSetToFalse()
        {
            PropertyInfo[] propertyWithAttribute = typeof(SimpleClassWithOptionalAttribute).GetProperties();

            bool result = MatchingDatabaseFieldHelper.GetMatchingDatabaseFieldIsRequired(propertyWithAttribute[0]);

            Assert.IsFalse(result);
        }
Beispiel #2
0
        public void CheckPropertyIsRequired_ShouldReturnTrue_WhenGettingDefaultValue()
        {
            PropertyInfo[] propertyWithAttribute = typeof(SimpleClassWithAttribute).GetProperties();

            bool result = MatchingDatabaseFieldHelper.GetMatchingDatabaseFieldIsRequired(propertyWithAttribute[0]);

            Assert.IsTrue(result);
        }