Exemplo n.º 1
0
        public void BonsaiToExpressionSlimConverter_VisitObject()
        {
            var deserializer = new TestBonsaiDeserializer(new SerializationState(BonsaiVersion.Default).ToJson());

            Assert.ThrowsException <BonsaiParseException>(() => deserializer.Visit(Json.Expression.Object(new Dictionary <string, Json.Expression>())));
        }
Exemplo n.º 2
0
        public void BonsaiToExpressionSlimConverter_Visit_EmptyArray()
        {
            var deserializer = new TestBonsaiDeserializer(new SerializationState(BonsaiVersion.Default).ToJson());

            Assert.ThrowsException <BonsaiParseException>(() => deserializer.Visit(Json.Expression.Array(Array.Empty <Json.Expression>())));
        }
Exemplo n.º 3
0
        public void BonsaiToExpressionSlimConverter_VisitConstant()
        {
            var deserializer = new TestBonsaiDeserializer(new SerializationState(BonsaiVersion.Default).ToJson());

            Assert.ThrowsException <BonsaiParseException>(() => deserializer.Visit(Json.Expression.String("foo")));
        }