public void TestInitialize() { var category = new Category() { Id = 1, Name = "category 1" }; var region = new Region() { Id = 1, Name = "region 1" }; var tcs = new List <TouristSpotCategory>() { new TouristSpotCategory() { CategoryId = category.Id, Category = category } }; TouristSpot = new TouristSpot() { Id = 1, Name = "name", Description = "description", Image = new byte[] { 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20 }, Region = region, TouristSpotCategories = tcs }; TouristSpotBasicInfoModel = new TouristSpotBasicInfoModel(TouristSpot); }
public void DoesNotEqualWithDifferentId() { var anotherTouristSpot = TouristSpot; anotherTouristSpot.Id = 2; var anotherTouristSpotModel = new TouristSpotBasicInfoModel(anotherTouristSpot); Assert.IsFalse(TouristSpotBasicInfoModel.Equals(anotherTouristSpotModel)); }
public void EqualsAnotherWithSameIdAndName() { var anotherTouristSpotModel = new TouristSpotBasicInfoModel(TouristSpot); Assert.IsTrue(TouristSpotBasicInfoModel.Equals(anotherTouristSpotModel)); }