public void should_merge_old_settings_with_new() { var toggles = new Internal.Togglez(); toggles.Set(@"{ foo: true, bar:'asd'}"); toggles.Set(@"{ bam: false, baz:123}"); Assert.IsTrue(toggles.IsOn("foo")); Assert.IsFalse(toggles.IsOn("bam")); Assert.AreEqual("asd", toggles.Get <string>("bar")); Assert.AreEqual(123, toggles.Get <int>("baz")); }
public void should_hold_int() { var toggles = new Internal.Togglez(); toggles.Set(@"{ foo: 23, bar:'asd'}"); Assert.AreEqual(23, toggles.Get <int>("foo")); }