Catel.Test.Data.ModelBaseFacts.TheEndEditMethod.AppliesChangesCorrectlyForObjectWithCustomType C# (CSharp) Метод

AppliesChangesCorrectlyForObjectWithCustomType() приватный Метод

private AppliesChangesCorrectlyForObjectWithCustomType ( ) : void
Результат void
            public void AppliesChangesCorrectlyForObjectWithCustomType()
            {
                var obj = new ObjectWithCustomType();
                var objAsIEditableObject = (IEditableObject)obj;

                obj.Gender = Gender.Female;

                objAsIEditableObject.BeginEdit();

                obj.Gender = Gender.Male;

                ((IEditableObject)obj).EndEdit();

                Assert.AreEqual(Gender.Male, obj.Gender);
            }