Ejemplo n.º 1
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.IsType <Verb>(obj);
            //Assert.That(obj.ToJSON(), Is.EqualTo(json));
        }
Ejemplo n.º 2
0
        public void TestStringOfJSONCtr()
        {
            var id        = "http://adlnet.gov/expapi/verbs/experienced";
            var json      = "{\"id\":\"" + id + "\"}";
            var strOfJson = new StringOfJSON(json);

            var obj = new Verb(strOfJson);

            Assert.IsInstanceOf <Verb>(obj);
            Assert.That(obj.ToJSON(), Is.EqualTo(json));
        }
Ejemplo n.º 3
0
        public void TestStringOfJSONCtr()
        {
            var mbox = "mailto:[email protected]";

            var json      = "{\"mbox\":\"" + mbox + "\"}";
            var strOfJson = new StringOfJSON(json);

            var obj = new Agent(strOfJson);

            Assert.IsInstanceOf <Agent>(obj);
            Assert.That(obj.Mbox, Is.EqualTo(mbox));
        }
Ejemplo n.º 4
0
        public void TestStringOfJSONCtr()
        {
            var json      = "{\"success\": true, \"completion\": true, \"response\": \"Yes\"}";
            var strOfJson = new StringOfJSON(json);

            var obj = new Result(strOfJson);

            Assert.IsInstanceOf <Result>(obj);
            Assert.That(obj.Success, Is.EqualTo(true));
            Assert.That(obj.Completion, Is.EqualTo(true));
            Assert.That(obj.Response, Is.EqualTo("Yes"));
        }
Ejemplo n.º 5
0
        public void TestStringOfJSONCtr()
        {
            var mbox = "mailto:[email protected]";

            var json      = "{\"mbox\":\"" + mbox + "\"}";
            var strOfJson = new StringOfJSON(json);

            var obj = new Agent(strOfJson);

            Assert.IsType <Agent>(obj);
            Assert.Equal(obj.mbox, mbox);
        }
Ejemplo n.º 6
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.IsInstanceOfType(obj, new Verb().GetType());
            //Assert.That(obj.ToJSON(), Is.EqualTo(json));
            Assert.AreEqual(json, obj.ToJSON(), true);
        }
Ejemplo n.º 7
0
        public void TestStringOfJSONCtr()
        {
            var json      = "{\"success\": true, \"completion\": true, \"response\": \"Yes\"}";
            var strOfJson = new StringOfJSON(json);

            var obj = new Result(strOfJson);

            //Assert.IsInstanceOf<Result>(obj);
            Assert.IsInstanceOfType(obj, new Result().GetType());
            //Assert.That(obj.success, Is.EqualTo(true));
            //Assert.That(obj.completion, Is.EqualTo(true));
            //Assert.That(obj.response, Is.EqualTo("Yes"));
            Assert.AreEqual(obj.completion, true);
            Assert.AreEqual(obj.success, true);
            Assert.AreEqual(obj.response, "Yes");
        }
Ejemplo n.º 8
0
 public LanguageMap(StringOfJSON json) : this(json.toJObject())
 {
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StatementsResult"/> class.
 /// </summary>
 /// <param name="json">The json.</param>
 public StatementsResult(StringOfJSON json) : this(json.toJObject())
 {
 }
Ejemplo n.º 10
0
 public Result(StringOfJSON json) : this(json.toJObject())
 {
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Score"/> class.
 /// </summary>
 /// <param name="json">The json.</param>
 public Score(StringOfJSON json) : this(json.toJObject())
 {
 }
Ejemplo n.º 12
0
 public StatementBase(StringOfJSON json) : this(json.toJObject())
 {
 }
Ejemplo n.º 13
0
 public Verb(StringOfJSON json) : this(json.toJObject())
 {
 }
Ejemplo n.º 14
0
 public AgentAccount(StringOfJSON json) : this(json.toJObject())
 {
 }
Ejemplo n.º 15
0
 protected StatementBase(StringOfJSON json) : this(json.toJObject())
 {
 }
Ejemplo n.º 16
0
 /// <summary>
 /// Initializes a new instance of the <see cref="About"/> class.
 /// </summary>
 /// <param name="json">The json.</param>
 public About(StringOfJSON json) : this(json.toJObject())
 {
 }
Ejemplo n.º 17
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Group"/> class.
 /// </summary>
 /// <param name="json">The json.</param>
 public Group(StringOfJSON json) : this(json.toJObject())
 {
 }
Ejemplo n.º 18
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ContextActivities"/> class.
 /// </summary>
 /// <param name="json">The json.</param>
 public ContextActivities(StringOfJSON json) : this(json.toJObject())
 {
 }
Ejemplo n.º 19
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SubStatement"/> class.
 /// </summary>
 /// <param name="json">The json.</param>
 public SubStatement(StringOfJSON json) : this(json.toJObject())
 {
 }
Ejemplo n.º 20
0
 public Context(StringOfJSON json) : this(json.toJObject())
 {
 }
Ejemplo n.º 21
0
 public Activity(StringOfJSON json) : this(json.toJObject())
 {
 }
Ejemplo n.º 22
0
 public ActivityDefinition(StringOfJSON json) : this(json.toJObject())
 {
 }
Ejemplo n.º 23
0
 public Attachment(StringOfJSON json) : this(json.toJObject())
 {
 }