Пример #1
0
        public void ShouldAddTwoMoreComments()
        {
            // arrange
            WorkItem workItem =
                new WorkItem(WORK_ITEM_ID, WORK_ITEM_TITLE, m_workItemStartTime, COMMENT_CONTENT0);

            // act
            workItem.AddComment(COMMENT_CONTENT1, m_commentDate1);
            workItem.AddComment(COMMENT_CONTENT2, m_commentDate2);

            // assert
            Assert.AreEqual(3, workItem.Comments.Count);
        }
Пример #2
0
        public void ShouldReturnLastCommentAdded()
        {
            // arrange
            WorkItem workItem =
                new WorkItem(WORK_ITEM_ID, WORK_ITEM_TITLE, m_workItemStartTime, COMMENT_CONTENT0);
            workItem.AddComment(COMMENT_CONTENT1, m_commentDate1);
            workItem.AddComment(COMMENT_CONTENT2, m_commentDate2);

            // act
            WorkItemComment workItemComment = workItem.LastComment;

            // assert
            Assert.AreEqual(COMMENT_CONTENT2, workItemComment.Title);
        }