Esempio n. 1
0
        public void CommentsEquals()
        {
            var Comment = new CommentModel()
            {
                Author     = 1,
                AuthorName = "Milos Hlava",
                Date       = new DateTime(2019, 1, 4),
                Id         = 1,
                Text       = "Testovaci koment"
            };

            var TheSameComment = new CommentModel()
            {
                Author     = 1,
                AuthorName = "Milos Hlava",
                Date       = new DateTime(2019, 1, 4),
                Id         = 1,
                Text       = "Testovaci koment"
            };

            Assert.True(Comment.Equals(TheSameComment));
            Assert.Equal(Comment.GetHashCode(), Comment.GetHashCode());
        }