예제 #1
0
        public void AddBoolNull()
        {
            var slice = new VPackBuilder()
                        .Add((bool?)null)
                        .Slice();

            Assert.True(slice.IsType(SliceType.Null));
            Assert.Equal(slice.Value(), null);
            Assert.Equal(slice.ToBoolean(), null);
        }
예제 #2
0
        public void AddBoolFalse()
        {
            var slice = new VPackBuilder()
                        .Add(false)
                        .Slice();

            Assert.True(slice.IsType(SliceType.Boolean));
            Assert.Equal(slice.Value().GetType(), typeof(bool));
            Assert.Equal(slice.Value(), false);
            Assert.Equal(slice.ToBoolean(), false);
        }