示例#1
0
        public void UploadedImageId_ShouldBeSetAndGottenCorrectly(int uploadedImageId)
        {
            // Arrange & Act
            var imageComment = new UploadedImageComments.UploadedImageComment {
                UploadedImageId = uploadedImageId
            };

            //Assert
            Assert.AreEqual(uploadedImageId, imageComment.UploadedImageId);
        }
示例#2
0
        public void DateCreated_ShouldBeSetAndGottenCorrectly(DateTime date)
        {
            // Arrange & Act
            var imageComment = new UploadedImageComments.UploadedImageComment {
                DateCreated = date
            };

            //Assert
            Assert.AreEqual(date, imageComment.DateCreated);
        }
示例#3
0
        public void AuthorId_ShouldBeSetAndGottenCorrectly(string userId)
        {
            // Arrange & Act
            var imageComment = new UploadedImageComments.UploadedImageComment {
                AuthorId = userId
            };

            //Assert
            Assert.AreEqual(userId, imageComment.AuthorId);
        }
示例#4
0
        public void IsDeleted_ShouldBeSetAndGottenCorrectly(bool isDeleted)
        {
            // Arrange & Act
            var imageComment = new UploadedImageComments.UploadedImageComment()
            {
                IsDeleted = isDeleted
            };

            //Assert
            Assert.AreEqual(isDeleted, imageComment.IsDeleted);
        }
示例#5
0
        public void Content_ShouldBeSetAndGottenCorrectly(string content)
        {
            // Arrange & Act
            var imageComment = new UploadedImageComments.UploadedImageComment()
            {
                Content = content
            };

            //Assert
            Assert.AreEqual(content, imageComment.Content);
        }
示例#6
0
        public void Id_ShouldBeSetAndGottenCorrectly(int commentId)
        {
            // Arrange & Act
            var imageComment = new UploadedImageComments.UploadedImageComment()
            {
                Id = commentId
            };

            //Assert
            Assert.AreEqual(commentId, imageComment.Id);
        }
示例#7
0
        public void Author_ShouldBeSetAndGottenCorrectly(string testAuthorId)
        {
            // Arrange & Act
            var user = new RegularUser {
                Id = testAuthorId
            };
            var imageComment = new UploadedImageComments.UploadedImageComment {
                Author = user
            };

            //Assert
            Assert.AreEqual(testAuthorId, imageComment.Author.Id);
        }
示例#8
0
        public void CommentsCollection_ShouldBeSetAndGottenCorrectly(int commentId)
        {
            //Arrange
            var comment = new UploadedImageComments.UploadedImageComment()
            {
                Id = commentId
            };
            var set = new List <UploadedImageComments.UploadedImageComment> {
                comment
            };
            var image = new UploadedImages.UploadedImage {
                Comments = set
            };

            Assert.AreEqual(image.Comments.First().Id, commentId);
        }