コード例 #1
0
        private static void RequestReport(string url)
        {
            var response = ApiCaller.Get <PassSalesResponse>(url);

            ScenarioCache.StoreResponse(response);
            ScenarioCache.Store(ModelKeys.PassSalesReport, response.Data);
        }
コード例 #2
0
        public void WhenThePassIsUpdated()
        {
            var updatedPass = ScenarioCache.Get <PassModel>(_updatedPassKey);

            var restResponse = ApiCaller.Put <ActionReponse <PassModel> >(updatedPass, Routes.GetById("passes", updatedPass.Id));

            ScenarioCache.StoreResponse(restResponse);
        }
コード例 #3
0
        public void WhenTheRatesForAllTeachersAreRequested()
        {
            var url = Routes.TeacherRates;

            var response = ApiCaller.Get <List <TeacherRateModel> >(url);

            ScenarioCache.StoreResponse(response);
            ScenarioCache.Store(ModelKeys.TeacherRate, response.Data);
        }
コード例 #4
0
        public void WhenTheBlockDetailsReportIsRequested()
        {
            var blockId = ScenarioCache.GetId(ModelIdKeys.BlockId);

            var url      = Routes.GetBlockDetailsReport(blockId);
            var response = ApiCaller.Get <BlockDetailsResponse>(url);

            ScenarioCache.StoreResponse(response);
            ScenarioCache.Store(ModelKeys.BlockDetailsReport, response.Data);
        }
コード例 #5
0
        public void WhenBlocksForEnrolmentIsRequested()
        {
            var response = ApiCaller.Get <List <BlockForRegistrationModel> >(Routes.BlocksForEnrolment);

            ScenarioCache.StoreResponse(response);
        }
コード例 #6
0
        public void WhenTheUserIsDeleted()
        {
            var response = ApiCaller.Delete <UserModel>(Routes.GetById(Routes.Users, ScenarioCache.GetUserId()));

            ScenarioCache.StoreResponse(response);
        }
コード例 #7
0
        public void WhenUpcomingStatndAloneEventsAreRequested()
        {
            var response = ApiCaller.Get <List <EventForRegistrationModel> >(Routes.StandAloneEventsForRegistration);

            ScenarioCache.StoreResponse(response);
        }