Exemplo n.º 1
0
        public void TestEmptyCtr()
        {
            Verb obj = new Verb();
            Assert.IsInstanceOf<Verb>(obj);
            Assert.IsNull(obj.id);
            Assert.IsNull(obj.display);

            StringAssert.AreEqualIgnoringCase("{}", obj.ToJSON());
        }
Exemplo n.º 2
0
        public void TestStringOfJSONCtr()
        {
            String id = "http://adlnet.gov/expapi/verbs/experienced";
            String json = "{\"id\":\"" + id + "\"}";
            StringOfJSON strOfJson = new StringOfJSON(json);

            Verb obj = new Verb(strOfJson);
            Assert.IsInstanceOf<Verb>(obj);
            Assert.That(obj.ToJSON(), Is.EqualTo(json));
        }
Exemplo n.º 3
0
        public void TestJObjectCtr()
        {
            String id = "http://adlnet.gov/expapi/verbs/experienced";

            JObject cfg = new JObject();
            cfg.Add("id", id);

            Verb obj = new Verb(cfg);
            Assert.IsInstanceOf<Verb>(obj);
            Assert.That(obj.ToJSON(), Is.EqualTo("{\"id\":\"" + id + "\"}"));
        }