Catel.Test.Data.ModelBaseTest.IsDirtyWithChildrenWhenSavingParent C# (CSharp) Метод

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

private IsDirtyWithChildrenWhenSavingParent ( ) : void
Результат void
        public void IsDirtyWithChildrenWhenSavingParent()
        {
            // Create a collection
            var computerSettings = ModelBaseTestHelper.CreateComputerSettingsObject();
            SaveObjectToMemoryStream(computerSettings);
            Assert.IsFalse(computerSettings.IsDirty);

            // Make a chance in the lowest level (but only if ObservableCollection, that is the only supported type)
            computerSettings.IniFileCollection[0].FileName = "is dirty should be enabled now 2";
            Assert.IsTrue(computerSettings.IniFileCollection[0].IsDirty);
            Assert.IsTrue(computerSettings.IsDirty);

            // Save the top level
            SaveObjectToMemoryStream(computerSettings);
            Assert.IsFalse(computerSettings.IniFileCollection[0].IniEntryCollection[0].IsDirty);
            Assert.IsFalse(computerSettings.IsDirty);
        }
        #endregion
ModelBaseTest