Ejemplo n.º 1
0
 public void UpdateAttributes(TouristSpot touristSpotWithModification)
 {
     Name             = touristSpotWithModification.Name;
     Description      = touristSpotWithModification.Description;
     Image            = touristSpotWithModification.Image;
     Region           = touristSpotWithModification.Region;
     ListOfCategories = touristSpotWithModification.ListOfCategories;
 }
Ejemplo n.º 2
0
        public override bool Equals(object obj)
        {
            if (!(obj is TouristSpot))
            {
                return(false);
            }

            TouristSpot touristSpot = obj as TouristSpot;

            return(this.Id == touristSpot.Id);
        }
Ejemplo n.º 3
0
        public void VerifyFormat()
        {
            if (IsInvalidNameOrAddressOrDesription())
            {
                throw new LodgingException(MessageExceptionDomain.ErrorIsEmpty);
            }

            if (IsInvalidQuantityOfStars())
            {
                throw new LodgingException(MessageExceptionDomain.ErrorQuantity);
            }

            if (IsInvalidadPricePerNight())
            {
                throw new LodgingException(MessageExceptionDomain.ErrorPrice);
            }

            if (IsInvalidListOfPictures())
            {
                throw new LodgingException(MessageExceptionDomain.ErrorListPictures);
            }

            TouristSpot.VerifyFormat();
        }