public void CalculateTotalLodgingCost_Returns_TotalPrice_Test()
        {
            //arrange
            IAdventureLodging   al   = new AdventureLodging();
            ILodgingReservation lres = new LodgingReservation();

            lres.ClientName      = "Maurice Muoneke";
            lres.PricePerPerson  = 300m;
            lres.FeesPerPerson   = 39m;
            lres.Destination     = "Paris, France";
            lres.Origin          = "Austin, Texas";
            lres.IsFrequentFlier = false;
            lres.NumberInParty   = 1;
            lres.ReservationId   = Guid.NewGuid();
            lres.DepartureDate   = DateTime.Parse("12/28/2013");
            lres.ReturnDate      = DateTime.Parse("01/21/2014");
            lres.Occupants       = new List <HotelOccupant> {
                new HotelOccupant {
                    FirstName = "Maurice", LastName = "Muoneke", Gender = Gender.Male, Nationality = "United States", MiddleName = "I", DateOfBirth = DateTime.Parse("12/17/2011")
                }
            };

            //act
            var actual   = 339m;
            var expected = al.CalculateTotalLodgingCost(lres);

            //assert
            //Assert.AreEqual(expected, actual, "Expected and actual lodging reservation costs plus fees");
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (entityId_ != null)
            {
                hash ^= EntityId.GetHashCode();
            }
            if (sourceNote_ != null)
            {
                hash ^= SourceNote.GetHashCode();
            }
            if (Category != 0)
            {
                hash ^= Category.GetHashCode();
            }
            if (AdditionalNote.Length != 0)
            {
                hash ^= AdditionalNote.GetHashCode();
            }
            if (IncludeOnConfirmation != false)
            {
                hash ^= IncludeOnConfirmation.GetHashCode();
            }
            if (lodgingReservation_ != null)
            {
                hash ^= LodgingReservation.GetHashCode();
            }
            if (SourceNoteSubject.Length != 0)
            {
                hash ^= SourceNoteSubject.GetHashCode();
            }
            if (IsFulfilled != false)
            {
                hash ^= IsFulfilled.GetHashCode();
            }
            if (PermanentOnGuestRecord != false)
            {
                hash ^= PermanentOnGuestRecord.GetHashCode();
            }
            if (incidentalItemId_ != null)
            {
                hash ^= IncidentalItemId.GetHashCode();
            }
            if (incStartDate_ != null)
            {
                hash ^= IncStartDate.GetHashCode();
            }
            if (incEndDate_ != null)
            {
                hash ^= IncEndDate.GetHashCode();
            }
            return(hash);
        }
 public void MergeFrom(ReservationNote other)
 {
     if (other == null)
     {
         return;
     }
     if (other.entityId_ != null)
     {
         if (entityId_ == null)
         {
             entityId_ = new global::HOLMS.Types.Booking.Indicators.ReservationNoteIndicator();
         }
         EntityId.MergeFrom(other.EntityId);
     }
     if (other.sourceNote_ != null)
     {
         if (sourceNote_ == null)
         {
             sourceNote_ = new global::HOLMS.Types.Operations.NoteRequests.NoteRequestIndicator();
         }
         SourceNote.MergeFrom(other.SourceNote);
     }
     if (other.Category != 0)
     {
         Category = other.Category;
     }
     if (other.AdditionalNote.Length != 0)
     {
         AdditionalNote = other.AdditionalNote;
     }
     if (other.IncludeOnConfirmation != false)
     {
         IncludeOnConfirmation = other.IncludeOnConfirmation;
     }
     if (other.lodgingReservation_ != null)
     {
         if (lodgingReservation_ == null)
         {
             lodgingReservation_ = new global::HOLMS.Types.Booking.Indicators.ReservationIndicator();
         }
         LodgingReservation.MergeFrom(other.LodgingReservation);
     }
     if (other.SourceNoteSubject.Length != 0)
     {
         SourceNoteSubject = other.SourceNoteSubject;
     }
     if (other.IsFulfilled != false)
     {
         IsFulfilled = other.IsFulfilled;
     }
 }
        public void CalculateTotalLodgingFees_NoVacancyAvailable_Throws_Exception_Test()
        {
            //arrange
            IAdventureLodging   al   = new AdventureLodging();
            ILodgingReservation lres = new LodgingReservation();

            lres.ClientName      = "Maurice Muoneke";
            lres.PricePerPerson  = 300m;
            lres.FeesPerPerson   = 39.95m;
            lres.Destination     = "Paris, France";
            lres.Origin          = "Austin, Texas";
            lres.IsFrequentFlier = false;
            lres.NumberInParty   = 1;
            lres.ReservationId   = Guid.NewGuid();
            lres.DepartureDate   = DateTime.Parse("12/28/2013");
            lres.ReturnDate      = DateTime.Parse("01/21/2014");
            lres.Occupants       = new List <HotelOccupant> {
                new HotelOccupant {
                    FirstName = "Maurice", LastName = "Muoneke", Gender = Gender.Male, Nationality = "United States", MiddleName = "I", DateOfBirth = DateTime.Parse("12/17/2011")
                },
                new HotelOccupant {
                    FirstName = "Ada", LastName = "Muoneke", Gender = Gender.Female, Nationality = "United States", MiddleName = "I", DateOfBirth = DateTime.Parse("12/17/2011")
                },
                new HotelOccupant {
                    FirstName = "Evonne", LastName = "Muoneke", Gender = Gender.Female, Nationality = "United States", MiddleName = "I", DateOfBirth = DateTime.Parse("12/17/2011")
                },
                new HotelOccupant {
                    FirstName = "Bryan", LastName = "Muoneke", Gender = Gender.Male, Nationality = "United States", MiddleName = "I", DateOfBirth = DateTime.Parse("12/17/2011")
                },
                new HotelOccupant {
                    FirstName = "Michelle", LastName = "Muoneke", Gender = Gender.Female, Nationality = "United States", MiddleName = "I", DateOfBirth = DateTime.Parse("12/17/2011")
                },
                new HotelOccupant {
                    FirstName = "Ozioma", LastName = "Muoneke", Gender = Gender.Female, Nationality = "Nigerian", MiddleName = "I", DateOfBirth = DateTime.Parse("12/17/2009")
                },
                new HotelOccupant {
                    FirstName = "Chizuru", LastName = "Muoneke", Gender = Gender.Female, Nationality = "Nigerian", MiddleName = "I", DateOfBirth = DateTime.Parse("12/17/2006")
                }
            };

            //act
            var actual   = 279.65m;
            var expected = al.CalculateTotalLodgingFees(lres);

            //assert
            //Assert.AreEqual(expected, actual, "Expected and actual lodging reservation plus fees");
        }
 public void MergeFrom(ReservationNote other)
 {
     if (other == null)
     {
         return;
     }
     if (other.entityId_ != null)
     {
         if (entityId_ == null)
         {
             entityId_ = new global::HOLMS.Types.Booking.Indicators.ReservationNoteIndicator();
         }
         EntityId.MergeFrom(other.EntityId);
     }
     if (other.sourceNote_ != null)
     {
         if (sourceNote_ == null)
         {
             sourceNote_ = new global::HOLMS.Types.Operations.NoteRequests.NoteRequestIndicator();
         }
         SourceNote.MergeFrom(other.SourceNote);
     }
     if (other.Category != 0)
     {
         Category = other.Category;
     }
     if (other.AdditionalNote.Length != 0)
     {
         AdditionalNote = other.AdditionalNote;
     }
     if (other.IncludeOnConfirmation != false)
     {
         IncludeOnConfirmation = other.IncludeOnConfirmation;
     }
     if (other.lodgingReservation_ != null)
     {
         if (lodgingReservation_ == null)
         {
             lodgingReservation_ = new global::HOLMS.Types.Booking.Indicators.ReservationIndicator();
         }
         LodgingReservation.MergeFrom(other.LodgingReservation);
     }
     if (other.SourceNoteSubject.Length != 0)
     {
         SourceNoteSubject = other.SourceNoteSubject;
     }
     if (other.IsFulfilled != false)
     {
         IsFulfilled = other.IsFulfilled;
     }
     if (other.PermanentOnGuestRecord != false)
     {
         PermanentOnGuestRecord = other.PermanentOnGuestRecord;
     }
     if (other.incidentalItemId_ != null)
     {
         if (incidentalItemId_ == null)
         {
             incidentalItemId_ = new global::HOLMS.Types.Supply.IncidentalItems.IncidentalItemIndicator();
         }
         IncidentalItemId.MergeFrom(other.IncidentalItemId);
     }
     if (other.incStartDate_ != null)
     {
         if (incStartDate_ == null)
         {
             incStartDate_ = new global::HOLMS.Types.Primitive.PbLocalDate();
         }
         IncStartDate.MergeFrom(other.IncStartDate);
     }
     if (other.incEndDate_ != null)
     {
         if (incEndDate_ == null)
         {
             incEndDate_ = new global::HOLMS.Types.Primitive.PbLocalDate();
         }
         IncEndDate.MergeFrom(other.IncEndDate);
     }
 }