public void TestReadEventOccurrenceSummary_CheckEffectiveCost_UseOccurrenceCost()
        {
            var handler = CreateHandler();
            var request = new ReadEventOccurrenceSummaryRequest();
            request.EventOccurrenceId = 1;

            var response = HandleRequest<ReadEventOccurrenceSummaryResponse>(handler, request);
            Assert.AreEqual(1, response.EventOccurrenceSummary.Id);
            Assert.AreEqual(150, response.EventOccurrenceSummary.EffectiveCost);
        }
        public void TestReadEventOccurrenceSummary()
        {
            var handler = CreateHandler();
            var request = new ReadEventOccurrenceSummaryRequest();
            request.EventOccurrenceId = 1;

            var response = HandleRequest<ReadEventOccurrenceSummaryResponse>(handler, request);
            Assert.AreEqual(1, response.EventOccurrenceSummary.Id);
            Assert.AreEqual("Lobotomy Class", response.EventOccurrenceSummary.EventTitle);
            Assert.AreEqual("Learn how to disable part of a brain.", response.EventOccurrenceSummary.EventSummaryDescription);
            Assert.AreEqual("HealthSouth 280", response.EventOccurrenceSummary.OrgUnitOrgUnitPublishedName);
            Assert.AreEqual("lobotomy-class", response.EventOccurrenceSummary.EventDirectUrl);
            Assert.AreEqual(1, response.EventOccurrenceSummary.EventOccurrenceDatesCount);
            Assert.AreEqual(150, response.EventOccurrenceSummary.EffectiveCost);
        }
Exemplo n.º 3
0
        public static string ReadEventOccurrencSummary(ModuleInstanceView parent, IDictionary<string, string> parameters)
        {
            var request = new ReadEventOccurrenceSummaryRequest();
            request.EventOccurrenceId = int.Parse(parameters["EventOccurrenceId"]);
            var occurrence = parent.ProcessRequest<ReadEventOccurrenceSummaryResponse>(request).EventOccurrenceSummary;

            var occurrenceSummary = new EventOccurrenceSummaryModel()
            {
                Id = occurrence.Id,
                EventTitle = occurrence.EventTitle,
                EventImageUrl = occurrence.EventImagePath,
                EventSpecialInstructions = occurrence.EventSpecialInstructions,
                AvailableSeats = occurrence.AvailableSeats,
                Description = occurrence.EventSummaryDescription,
                OccurrenceSpecialInstructions = occurrence.SpecialInstructions,
                IsGuestDemographicInfoRequired = occurrence.IsGuestDemographicInfoRequired,
                LocationName = occurrence.EffectiveLocationName,
                StartDate = occurrence.StartDate.HasValue ? occurrence.StartDate.Value.ToString("M/d/yy h:mm tt") : "Open",
                LeadManagementBusinessUnitId = occurrence.BrightWhistleBusinessUnitId
            };

            return CommonUtils.JsonSerialize(occurrenceSummary);
        }