public void LikeObjectTypeTest() { // get test Assert.That(LikeObjectType.Post.ToString(), Is.EqualTo("post")); Assert.That(LikeObjectType.Comment.ToString(), Is.EqualTo("comment")); Assert.That(LikeObjectType.Photo.ToString(), Is.EqualTo("photo")); Assert.That(LikeObjectType.Audio.ToString(), Is.EqualTo("audio")); Assert.That(LikeObjectType.Video.ToString(), Is.EqualTo("video")); Assert.That(LikeObjectType.Note.ToString(), Is.EqualTo("note")); Assert.That(LikeObjectType.PhotoComment.ToString(), Is.EqualTo("photo_comment")); Assert.That(LikeObjectType.VideoComment.ToString(), Is.EqualTo("video_comment")); Assert.That(LikeObjectType.TopicComment.ToString(), Is.EqualTo("topic_comment")); Assert.That(LikeObjectType.SitePage.ToString(), Is.EqualTo("sitepage")); Assert.That(LikeObjectType.Market.ToString(), Is.EqualTo("market")); Assert.That(LikeObjectType.MarketComment.ToString(), Is.EqualTo("market_comment")); // parse test Assert.That(LikeObjectType.FromJsonString("post"), Is.EqualTo(LikeObjectType.Post)); Assert.That(LikeObjectType.FromJsonString("comment"), Is.EqualTo(LikeObjectType.Comment)); Assert.That(LikeObjectType.FromJsonString("photo"), Is.EqualTo(LikeObjectType.Photo)); Assert.That(LikeObjectType.FromJsonString("audio"), Is.EqualTo(LikeObjectType.Audio)); Assert.That(LikeObjectType.FromJsonString("video"), Is.EqualTo(LikeObjectType.Video)); Assert.That(LikeObjectType.FromJsonString("note"), Is.EqualTo(LikeObjectType.Note)); Assert.That(LikeObjectType.FromJsonString("photo_comment"), Is.EqualTo(LikeObjectType.PhotoComment)); Assert.That(LikeObjectType.FromJsonString("video_comment"), Is.EqualTo(LikeObjectType.VideoComment)); Assert.That(LikeObjectType.FromJsonString("topic_comment"), Is.EqualTo(LikeObjectType.TopicComment)); Assert.That(LikeObjectType.FromJsonString("sitepage"), Is.EqualTo(LikeObjectType.SitePage)); Assert.That(LikeObjectType.FromJsonString("market"), Is.EqualTo(LikeObjectType.Market)); Assert.That(LikeObjectType.FromJsonString("market_comment"), Is.EqualTo(LikeObjectType.MarketComment)); }
public void LikeObjectTypeTest() { // get test Assert.That(actual: LikeObjectType.Post.ToString(), expression: Is.EqualTo(expected: "post")); Assert.That(actual: LikeObjectType.Comment.ToString(), expression: Is.EqualTo(expected: "comment")); Assert.That(actual: LikeObjectType.Photo.ToString(), expression: Is.EqualTo(expected: "photo")); Assert.That(actual: LikeObjectType.Audio.ToString(), expression: Is.EqualTo(expected: "audio")); Assert.That(actual: LikeObjectType.Video.ToString(), expression: Is.EqualTo(expected: "video")); Assert.That(actual: LikeObjectType.Note.ToString(), expression: Is.EqualTo(expected: "note")); Assert.That(actual: LikeObjectType.PhotoComment.ToString(), expression: Is.EqualTo(expected: "photo_comment")); Assert.That(actual: LikeObjectType.VideoComment.ToString(), expression: Is.EqualTo(expected: "video_comment")); Assert.That(actual: LikeObjectType.TopicComment.ToString(), expression: Is.EqualTo(expected: "topic_comment")); Assert.That(actual: LikeObjectType.SitePage.ToString(), expression: Is.EqualTo(expected: "sitepage")); Assert.That(actual: LikeObjectType.Market.ToString(), expression: Is.EqualTo(expected: "market")); Assert.That(actual: LikeObjectType.MarketComment.ToString(), expression: Is.EqualTo(expected: "market_comment")); // parse test Assert.That(actual: LikeObjectType.FromJsonString(response: "post"), expression: Is.EqualTo(expected: LikeObjectType.Post)); Assert.That(actual: LikeObjectType.FromJsonString(response: "comment") , expression: Is.EqualTo(expected: LikeObjectType.Comment)); Assert.That(actual: LikeObjectType.FromJsonString(response: "photo"), expression: Is.EqualTo(expected: LikeObjectType.Photo)); Assert.That(actual: LikeObjectType.FromJsonString(response: "audio"), expression: Is.EqualTo(expected: LikeObjectType.Audio)); Assert.That(actual: LikeObjectType.FromJsonString(response: "video"), expression: Is.EqualTo(expected: LikeObjectType.Video)); Assert.That(actual: LikeObjectType.FromJsonString(response: "note"), expression: Is.EqualTo(expected: LikeObjectType.Note)); Assert.That(actual: LikeObjectType.FromJsonString(response: "photo_comment") , expression: Is.EqualTo(expected: LikeObjectType.PhotoComment)); Assert.That(actual: LikeObjectType.FromJsonString(response: "video_comment") , expression: Is.EqualTo(expected: LikeObjectType.VideoComment)); Assert.That(actual: LikeObjectType.FromJsonString(response: "topic_comment") , expression: Is.EqualTo(expected: LikeObjectType.TopicComment)); Assert.That(actual: LikeObjectType.FromJsonString(response: "sitepage") , expression: Is.EqualTo(expected: LikeObjectType.SitePage)); Assert.That(actual: LikeObjectType.FromJsonString(response: "market"), expression: Is.EqualTo(expected: LikeObjectType.Market)); Assert.That(actual: LikeObjectType.FromJsonString(response: "market_comment") , expression: Is.EqualTo(expected: LikeObjectType.MarketComment)); }