Пример #1
0
        public void TestEditNullableWithValueProperty()
        {
            Csla.ApplicationContext.GlobalContext.Clear();
            var entity = NullableEntity.NewNullableEntity();

            entity.NullableInteger = 1;
            Assert.AreEqual(1, entity.NullableInteger);
        }
Пример #2
0
        public void TestEditNullableViaBusinessRuleProperty()
        {
            Csla.ApplicationContext.GlobalContext.Clear();
            var entity = NullableEntity.NewNullableEntity();

            entity.NullableInteger = 1;
            entity.Name            = "test";
            entity.Name            = string.Empty;
            Assert.AreEqual(null, entity.NullableInteger);
        }