ApplicationSettingsTests.ReadFromInstanceTests.When_reading_from_public_properties.Then_write_only_properties_should_be_skipped C# (CSharp) Method

Then_write_only_properties_should_be_skipped() private method

private Then_write_only_properties_should_be_skipped ( ) : void
return void
        public void Then_write_only_properties_should_be_skipped()
        {
            var settings = new AppSettings("filename", FileOption.None);
            var mySettings = new SettingsWithWriteOnlyProperty();
            mySettings.NonEmptyStringValue = "abc";

            settings.ReadFrom(mySettings);

            Assert.AreEqual("abc", settings.GetValue("NonEmptyStringValue"));
            Assert.IsFalse(settings.HasAppSetting("DoubleValue"));
        }