Beispiel #1
0
        protected static LocalizedRealEstate[] BuildLocalizedAccommodations(
            IEnumerable <IToLocalizedAccommodation> eanEntities,
            IReadOnlyDictionary <int, int> ExpediaIdsToIds,
            int languageId,
            int creatorId
            )
        {
            var localizedAccommodations = new Queue <LocalizedRealEstate>();

            foreach (var activeProperty in eanEntities)
            {
                if (!ExpediaIdsToIds.TryGetValue(activeProperty.EANHotelID, out var id))
                {
                    continue;
                }

                var localizedAccommodation = new LocalizedRealEstate()
                {
                    Id           = id,
                    LanguageId   = languageId,
                    Name         = activeProperty.Name,
                    Location     = activeProperty.Location,
                    CheckInTime  = activeProperty.CheckInTime,
                    CheckOutTime = activeProperty.CheckOutTime,
                    CreatorId    = creatorId
                };

                localizedAccommodations.Enqueue(localizedAccommodation);
            }

            return(localizedAccommodations.ToArray());
        }
Beispiel #2
0
        public void Name()
        {
            //Arrange
            const string name = "Some Name";

            //Act
            var realEstate = new LocalizedRealEstate
            {
                Name = name
            };

            //Assert
            Assert.AreEqual(name, realEstate.Name);
        }