public void TestInitWithSdj()
        {
            Dictionary <string, object> dict = new Dictionary <string, object>();

            dict.Add("demo", 5);
            SelfDescribingJson data = new SelfDescribingJson("iglu:acme.com/demo_app/jsonschema/1-0-0", dict);
            SelfDescribingJson sdj  = new SelfDescribingJson("iglu:acme.com/demo/jsonschema/1-0-0", data);

            Assert.NotNull(sdj);
            Assert.AreEqual(126, sdj.GetByteSize());
            CollectionAssert.AreEquivalent(JSON.Deserialize <Dictionary <string, object> >("{\"data\":{\"data\":{\"demo\":5}, \"schema\":\"iglu:acme.com/demo_app/jsonschema/1-0-0\"}, \"schema\":\"iglu:acme.com/demo/jsonschema/1-0-0\"}"), JSON.Deserialize <Dictionary <string, object> >(sdj.ToString()));

            dict.Add("app", "hello");
            data.SetData(dict);
            sdj.SetData(data);

            CollectionAssert.AreEquivalent(JSON.Deserialize <Dictionary <string, object> >("{\"data\":{\"data\":{\"app\":\"hello\", \"demo\":5}, \"schema\":\"iglu:acme.com/demo_app/jsonschema/1-0-0\"}, \"schema\":\"iglu:acme.com/demo/jsonschema/1-0-0\"}"), JSON.Deserialize <Dictionary <string, object> >(sdj.ToString()));
        }
        public void TestInitWithObject()
        {
            Dictionary <string, object> dict = new Dictionary <string, object> ();

            dict.Add("demo", 5);
            SelfDescribingJson sdj = new SelfDescribingJson("iglu:acme.com/demo_app/jsonschema/1-0-0", dict);

            Assert.NotNull(sdj);
            Assert.AreEqual(71, sdj.GetByteSize());
            Assert.AreEqual("{\"data\":{\"demo\":5}, \"schema\":\"iglu:acme.com/demo_app/jsonschema/1-0-0\"}", sdj.ToString());

            sdj.SetSchema("iglu:acme.com/demo_app/jsonschema/1-0-1");

            Assert.AreEqual("{\"data\":{\"demo\":5}, \"schema\":\"iglu:acme.com/demo_app/jsonschema/1-0-1\"}", sdj.ToString());

            dict.Add("app", "hello");
            sdj.SetData(dict);

            Assert.AreEqual("{\"data\":{\"app\":\"hello\", \"demo\":5}, \"schema\":\"iglu:acme.com/demo_app/jsonschema/1-0-1\"}", sdj.ToString());
        }