Beispiel #1
0
        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);
        }
Beispiel #2
0
        public void DoesNotEqualWithDifferentId()
        {
            var anotherTouristSpot = TouristSpot;

            anotherTouristSpot.Id = 2;
            var anotherTouristSpotModel = new TouristSpotBasicInfoModel(anotherTouristSpot);

            Assert.IsFalse(TouristSpotBasicInfoModel.Equals(anotherTouristSpotModel));
        }
Beispiel #3
0
        public void EqualsAnotherWithSameIdAndName()
        {
            var anotherTouristSpotModel = new TouristSpotBasicInfoModel(TouristSpot);

            Assert.IsTrue(TouristSpotBasicInfoModel.Equals(anotherTouristSpotModel));
        }