Esempio 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>())));
        }
Esempio 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>())));
        }
Esempio 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")));
        }