コード例 #1
0
 public override System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> ReadFields(System.IO.BinaryReader binaryReader)
 {
     System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(base.ReadFields(binaryReader));
     this.IntegrationType     = ((IntegrationTypeEnum)(binaryReader.ReadInt16()));
     this.NumberIterations    = binaryReader.ReadInt16();
     this.Weight              = binaryReader.ReadSingle();
     this.Drag                = binaryReader.ReadSingle();
     this.WindScale           = binaryReader.ReadSingle();
     this.WindFlappinessScale = binaryReader.ReadSingle();
     this.LongestRod          = binaryReader.ReadSingle();
     this.fieldpad            = binaryReader.ReadBytes(24);
     return(pointerQueue);
 }
コード例 #2
0
            public void CheckHasNoEffectIfStartDateAtOrBeforeCurrentDate(IntegrationTypeEnum type)
            {
                //Arrange
                var booking = new Booking
                {
                    Order = new Order
                    {
                        IntegrationType = type
                    },
                    StartDate = DateTime.Today,
                    BusinessId = BUSINESS_ID
                };

                //Act and Assert
                TestCallHasNoEffect(BOOKING_ID, booking);
            }
コード例 #3
0
            public void CheckNoAvailabilityIfCriteriaDatesDontMatchBookingDates(IntegrationTypeEnum type, DateTime startDate, DateTime criteriaStartDate, DateTime endDate, DateTime criteriaEndDate)
            {
                //Arrange
                var criteria = new AvailabilitySearchCriteria
                {
                    ModifyBookingId = BOOKING_ID,
                    RatePlanId = CRITERIA_RATE_PLAN_ID,
                    RoomTypeId = CRITERIA_ROOM_TYPE_ID,
                    StartDate = new CalendarDate{ Day = criteriaStartDate.Day, Month = criteriaStartDate.Month, Year = criteriaStartDate.Year},
                    EndDate = new CalendarDate{ Day = criteriaEndDate.Day, Month = criteriaEndDate.Month, Year = criteriaEndDate.Year},
                    BusinessIds = new List<long>{ BUSINESS_ID}
                };

                var booking = new Booking
                {
                    Order = new Order
                    {
                        IntegrationType = type,
                        OrderSourceCode = "D"
                    },
                    StartDate = startDate,
                    EndDate = endDate,
                    RatePlanId = BOOKING_RATE_PLAN_ID,
                    RoomTypeId = BOOKING_ROOM_TYPE_ID,
                    BusinessId = BUSINESS_ID
                };

                //Act
                var result = availabilityManager.UpdateCriteriaForExistingBooking(criteria, booking);

                //Assert
                Assert.AreNotEqual(null, result, "Availability incorrectly set to available");
                Assert.AreEqual(CRITERIA_RATE_PLAN_ID, criteria.RatePlanId, "Rate Plan Id Modified Incorrectly");
                Assert.AreEqual(CRITERIA_ROOM_TYPE_ID, criteria.RoomTypeId, "Room Type Modified incorrectly");
            }
コード例 #4
0
            public void CheckHasNoEffectIfInvalidIntegrationTypeSupplied(IntegrationTypeEnum type)
            {
                //Arrange
                var booking = new Booking
                {
                    Order = new Order
                    {
                        IntegrationType = type
                    }, BusinessId = BUSINESS_ID
                };

                //Act and Assert
                TestCallHasNoEffect(BOOKING_ID, booking);
            }