Ejemplo n.º 1
0
        public void CommentObjectTypeTest()
        {
            // get test
            Assert.That(CommentObjectType.Post.ToString(), Is.EqualTo("post"));
            Assert.That(CommentObjectType.Photo.ToString(), Is.EqualTo("photo"));
            Assert.That(CommentObjectType.Video.ToString(), Is.EqualTo("video"));
            Assert.That(CommentObjectType.Topic.ToString(), Is.EqualTo("topic"));
            Assert.That(CommentObjectType.Note.ToString(), Is.EqualTo("note"));

            // parse test
            Assert.That(CommentObjectType.FromJsonString("post")
                        , Is.EqualTo(CommentObjectType.Post));

            Assert.That(CommentObjectType.FromJsonString("photo")
                        , Is.EqualTo(CommentObjectType.Photo));

            Assert.That(CommentObjectType.FromJsonString("video")
                        , Is.EqualTo(CommentObjectType.Video));

            Assert.That(CommentObjectType.FromJsonString("topic")
                        , Is.EqualTo(CommentObjectType.Topic));

            Assert.That(CommentObjectType.FromJsonString("note")
                        , Is.EqualTo(CommentObjectType.Note));
        }
Ejemplo n.º 2
0
        public void CommentObjectTypeTest()
        {
            // get test
            Assert.That(actual: CommentObjectType.Post.ToString(), expression: Is.EqualTo(expected: "post"));
            Assert.That(actual: CommentObjectType.Photo.ToString(), expression: Is.EqualTo(expected: "photo"));
            Assert.That(actual: CommentObjectType.Video.ToString(), expression: Is.EqualTo(expected: "video"));
            Assert.That(actual: CommentObjectType.Topic.ToString(), expression: Is.EqualTo(expected: "topic"));
            Assert.That(actual: CommentObjectType.Note.ToString(), expression: Is.EqualTo(expected: "note"));

            // parse test
            Assert.That(actual: CommentObjectType.FromJsonString(response: "post")
                        , expression: Is.EqualTo(expected: CommentObjectType.Post));

            Assert.That(actual: CommentObjectType.FromJsonString(response: "photo")
                        , expression: Is.EqualTo(expected: CommentObjectType.Photo));

            Assert.That(actual: CommentObjectType.FromJsonString(response: "video")
                        , expression: Is.EqualTo(expected: CommentObjectType.Video));

            Assert.That(actual: CommentObjectType.FromJsonString(response: "topic")
                        , expression: Is.EqualTo(expected: CommentObjectType.Topic));

            Assert.That(actual: CommentObjectType.FromJsonString(response: "note")
                        , expression: Is.EqualTo(expected: CommentObjectType.Note));
        }