public void Check_That_Genre_Comparer_Throws_Exception_When_Obj1_And_Obj2_Have_Wrong_Type() { var comparer = new GenreComparer(); var obj1 = new Object(); var obj2 = new Object(); comparer.AreEqual(obj1, obj2); }
public void Check_That_Genre_Comparer_Returns_False_For_Not_Equal_Genres() { var genre1 = new Genre { NorthwindId = 1, IsReadonly = true, Games = new List <Game>(), GenreId = 1, ParentGenre = new Genre(), ParentGenreId = 5, GenreLocalizations = new List <GenreLocalization> { new GenreLocalization { Language = new Language { Code = "en", Name = "English", LanguageId = 1 }, Name = "name123", } }, }; var genre2 = new Genre { NorthwindId = 1, IsReadonly = true, Games = new List <Game>(), GenreId = 5, ParentGenre = new Genre(), ParentGenreId = 5, GenreLocalizations = new List <GenreLocalization> { new GenreLocalization { Language = new Language { Code = "en", Name = "English", LanguageId = 1 }, Name = "name", } }, }; var comparer = new GenreComparer(); bool result = comparer.AreEqual(genre1, genre2); Assert.IsTrue(!result); }