public void Equals_ObjectXIsNull_ReturnsFalse()
        {
            var comparer = new FeedItemComparer();

            var isEqual = comparer.Equals(null, new FeedItem());

            Assert.That(isEqual, Is.False);
        }
        public void GetHashCode_ReturnsHashCode()
        {
            var comparer = new FeedItemComparer();

            var hashCode = comparer.GetHashCode(new FeedItem {
                Artist = "abc", Album = "def"
            });

            Assert.That(hashCode, Is.EqualTo("abc".GetHashCode() + "def".GetHashCode()));
        }
        public void Equals_ArtistAndAlbumEquals_ReturnsTrue()
        {
            var comparer = new FeedItemComparer();

            var isEqual = comparer.Equals(new FeedItem {
                Artist = "abc", Album = "def"
            }, new FeedItem {
                Artist = "abc", Album = "def"
            });

            Assert.That(isEqual, Is.True);
        }
        public void Equals_AlbumDoesNotEquals_ReturnsFalse()
        {
            var comparer = new FeedItemComparer();

            var isEqual = comparer.Equals(new FeedItem {
                Artist = "abc", Album = "def"
            }, new FeedItem {
                Artist = "abc", Album = "ghi"
            });

            Assert.That(isEqual, Is.False);
        }