Catel.Test.Data.ModelBaseFacts.TheEndEditMethod.AppliesChangesCorrectlyForObjectWithCustomType C# (CSharp) Method

AppliesChangesCorrectlyForObjectWithCustomType() private method

private AppliesChangesCorrectlyForObjectWithCustomType ( ) : void
return 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);
            }