Example #1
0
        public void GivenAnItem_WhenComparedWithNullableItem_ThenNotEqual()
        {
            var libraryItem1 = new MusicLibraryItem(
                new ArtistData("artistName1"),
                new ReleaseData("releaseName1"));

            MusicLibraryItem libraryItem2 = null;

            Assert.IsFalse(libraryItem1.Equals(libraryItem2));
        }
Example #2
0
        public void GivenAnItemWithFaultyReleaseData_WhenComparedWithValidItem_ThenNotEqual()
        {
            var libraryItem1 = new MusicLibraryItem(
                new ArtistData("artistName1"),
                new ReleaseData("releaseName1"));

            var libraryItem2 = new MusicLibraryItem(
                new ArtistData("artistName1"),
                null);

            Assert.IsFalse(libraryItem1.Equals(libraryItem2));
        }
Example #3
0
        public void GivenTwoIdenticalItems_WhenCompared_ThenTheyAreEqual()
        {
            var libraryItem1 = new MusicLibraryItem(
                new ArtistData("artistName"),
                new ReleaseData("releaseName"));

            var libraryItem2 = new MusicLibraryItem(
                new ArtistData("artistName"),
                new ReleaseData("releaseName"));

            Assert.IsTrue(libraryItem1.Equals(libraryItem2));
        }
Example #4
0
        public void GivenTwoItemsWithDifferentArtistNameAndDifferentReleaseName_WhenCompared_ThenTheyAreNotEqual()
        {
            var libraryItem1 = new MusicLibraryItem(
                new ArtistData("artistName1"),
                new ReleaseData("releaseName1"));

            var libraryItem2 = new MusicLibraryItem(
                new ArtistData("artistName2"),
                new ReleaseData("releaseName2"));

            Assert.IsFalse(libraryItem1.Equals(libraryItem2));
        }