Exemple #1
0
        public void TestPostGetAndDeleteComment()
        {
            var timestamp = TimeSpan.FromSeconds(8);
            var comment   = trackApi.PostComment("test", timestamp);

            Assert.AreEqual(timestamp.TotalMilliseconds, comment.Timestamp.TotalMilliseconds);

            var actualComment = trackApi.GetComment(comment.Id);

            Assert.AreEqual(comment.Id, actualComment.Id);

            trackApi.DeleteComment(comment.Id);
            var webException = Assert.Throws <WebGatewayException>(() => trackApi.GetComment(comment.Id));

            Assert.AreEqual(HttpStatusCode.NotFound, webException.StatusCode);
        }