예제 #1
0
        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"));
        }
예제 #2
0
        public void should_hold_int()
        {
            var toggles = new Internal.Togglez();

            toggles.Set(@"{ foo: 23, bar:'asd'}");

            Assert.AreEqual(23, toggles.Get <int>("foo"));
        }