public void alter_is_isolated() { theParent.Replace(new FakeSettings()); theSettings.Alter <FakeSettings>(x => x.Hometown = "Austin"); theParent.Get <FakeSettings>().Hometown.ShouldNotEqual("Austin"); theSettings.Get <FakeSettings>().Hometown.ShouldEqual("Austin"); }
public void can_alter_the_settings_without_replacing_it() { var original = theSettings.Get <FakeSettings>(); theSettings.Alter <FakeSettings>(x => x.Name = "Max"); theSettings.Get <FakeSettings>().ShouldBeTheSameAs(original); theSettings.Get <FakeSettings>().Name.ShouldEqual("Max"); }
public void can_alter_the_settings_without_replacing_it() { var original = theSettings.Get <FakeSettings>(); theSettings.Alter <FakeSettings>(x => { Thread.Sleep(500); x.Name = "Max"; }); theSettings.Get <FakeSettings>().ShouldBeTheSameAs(original); theSettings.Get <FakeSettings>().Name.ShouldBe("Max"); }