public void SetScriptComment(int line_no, ScriptMessageType type, string message) { var change = false; var msg_data = (ScriptMessageData)null; lock (comment_list_sync_) { if (line_no < comment_list_.Length) { if (message != null) { /* データ有りの場合はデータベースに上書き登録 */ comment_list_[line_no] = new ScriptMessageData(DateTime.UtcNow, type, message); change = true; } else { /* データ無しの場合はデータベースから削除 */ comment_list_[line_no] = null; change = true; } } } if (change) { CommentUpdated?.Invoke(this, line_no, msg_data); } }
public void UpdateCommentStatus() { var commentCommand = new CommentUpdated() { CommentId = 3, Status = Framework.Models.EntityStatus.Active }; var response = commentService.UpdateCommentStatus(commentCommand); Assert.AreEqual(response.Type, Common.ServiceResponseTypes.Success); }
public void UpdateComment() { var commentCommand = new CommentUpdated() { CommentId = 3, UserId = 1010, RelatedDataEntityId = 1, RelatedDataEntityType = "Updated Test Product", Rating = 3, Body = "Updated Test Body" }; var response = commentService.UpdateComment(commentCommand); Assert.AreEqual(response.Type, Common.ServiceResponseTypes.Success); }
private void Runner_CommentUpdated(object sender, int line_no, ScriptMessageData msg) { CommentUpdated?.Invoke(this, line_no, msg); }