Exemplo n.º 1
0
    public void IsNotOtherThanString()
    {
        JsonObject json = new JsonObject();
        json.ParseDocument(testInput1);

        // test direct query
        Assert.That ( !json.IsArray ("name1") );
        Assert.That ( !json.IsBool ("name1") );
        Assert.That ( !json.IsDouble ("name1") );
        Assert.That ( !json.IsInt ("name1") );
        Assert.That ( !json.IsNull ("name1") );
        Assert.That ( !json.IsNumber ("name1") );
        Assert.That ( !json.IsObject ("name1") );

        JsonValue jv = json.GetValue("name1");
        Assert.That ( !jv.isArray );
        Assert.That ( !jv.isBool );
        Assert.That ( !jv.isDouble );
        Assert.That ( !jv.isInt );
        Assert.That ( !jv.isNull );
        Assert.That ( !jv.isNumber );
        Assert.That ( !jv.isObject );
    }