public void GivenAnItem_WhenComparedWithNullableItem_ThenNotEqual() { var libraryItem1 = new MusicLibraryItem( new ArtistData("artistName1"), new ReleaseData("releaseName1")); MusicLibraryItem libraryItem2 = null; Assert.IsFalse(libraryItem1.Equals(libraryItem2)); }
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)); }
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)); }
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)); }