Exemplo n.º 1
0
        public void Add_comment_Should_get_created_id(string nodeId, string departmentId, string userId)
        {
            var comment = new AddCommentDto
                {
                    DepartmentId = departmentId,
                    NodeId = nodeId,
                    UserId = userId,
                    Text = "<b>Bold comment</b>"
                };

            var response = Api.Comments.AddComment(comment).Fetch();
            Assert.That(response.Success, Is.True);
            var id = response.Result;
            Assert.That(id, Is.Not.Null.Or.Empty);
        }
Exemplo n.º 2
0
        public void Delete_comment_Should_get_bool(string nodeId, string departmentId, string userId)
        {
            var comment = new AddCommentDto
                {
                    DepartmentId = departmentId,
                    NodeId = nodeId,
                    UserId = userId,
                    Text = "<b>Bold comment</b>"
                };
            var id = Api.Comments.AddComment(comment).Fetch().Result;
            Assert.That(id, Is.Not.Null.Or.Empty);

            var response = Api.Comments.Delete(id).GetHttpResponse();
            Assert.That(response.StatusCode, Is.EqualTo(HttpStatusCode.OK));
 
        }
Exemplo n.º 3
0
 public AddCommentRequest AddComment(AddCommentDto comment)
 {
     return new AddCommentRequest(m_clientService, comment);
 }