public void WhenTheClassRoomUnassignmentIsRequested() { var classId = ScenarioCache.GetId(ModelIdKeys.ClassId); var response = ApiCaller.Delete <ActionReponse <ClassModel> >(Routes.GetClassRoom(classId)); ScenarioCache.StoreActionResponse(response); }
public void WhenTheUserTriesToEnrolInTheBlock() { var response = ApiCaller.Post <ActionReponse <UserModel> >(new EnrolmentModel(ScenarioCache.GetId(ModelIdKeys.BlockId)), Routes.GetEnrolUserInBlock(ScenarioCache.GetUserId())); ScenarioCache.StoreActionResponse(response); }
public void WhenTheClassIsUpdated() { var response = ApiCaller.Put <ActionReponse <ClassModel> >(ScenarioCache.Get <ClassModel>(ModelKeys.Class), Routes.GetById(Routes.Classes, ScenarioCache.GetId(ModelIdKeys.ClassId))); ScenarioCache.StoreActionResponse(response); }
public void WhenUserIsAttemptedToBeSetUpAsATeacher() { var userId = ScenarioCache.GetUserId(); var response = ApiCaller.Post <ActionReponse <TeacherModel> >(Routes.GetTeacherById(userId)); ScenarioCache.StoreActionResponse(response); }
public void WhenTheBlockIsDeleted() { var blockId = ScenarioCache.GetId(ModelIdKeys.BlockId); var response = ApiCaller.Delete <ActionReponse <BlockModel> >(Routes.GetById(Routes.Blocks, blockId)); ScenarioCache.StoreActionResponse(response); }
public void WhenTheBlockRoomUnassignmentIsRequested() { var blockId = ScenarioCache.GetId(ModelIdKeys.BlockId); var response = ApiCaller.Delete <ActionReponse <BlockModel> >(Routes.GetBlockRoom(blockId)); ScenarioCache.StoreActionResponse(response); }
public void WhenThePassTemplateIsAttemptedToBeCreated() { var response = ApiCaller.Post <ActionReponse <PassTemplateModel> >(ScenarioCache.Get <PassTemplateModel>(ModelKeys.PassTemplate), Routes.PassTemplate); ScenarioCache.StoreActionResponse(response); ScenarioCache.Store(ModelIdKeys.PassTemplateId, response.Data.ActionResult.Id); }
public void WhenTheBlockIsUpdated() { var response = ApiCaller.Put <ActionReponse <BlockModel> >(ScenarioCache.Get <BlockModel>(ModelKeys.Block), Routes.GetById(Routes.Blocks, ScenarioCache.GetId(ModelIdKeys.BlockId))); ScenarioCache.StoreActionResponse(response); }
public void WhenTheStandAloneEventIsAttemptedToBeCreated() { var response = ApiCaller.Post <ActionReponse <StandAloneEventModel> >(ScenarioCache.Get <StandAloneEventModel>(ModelKeys.StandAloneEvent), Routes.StandAloneEvent); ScenarioCache.StoreActionResponse(response); ScenarioCache.Store(ModelIdKeys.StandAloneEventId, response.Data.ActionResult.Id); }
public void WhenTheRoomIsAttemptedToBeCreated() { var response = ApiCaller.Post <ActionReponse <RoomModel> >(ScenarioCache.Get <RoomModel>(ModelKeys.Room), Routes.Room); ScenarioCache.StoreActionResponse(response); ScenarioCache.Store(ModelIdKeys.RoomId, response.Data.ActionResult.Id); }
public void WhenUserIsAttemptedToBeCreated() { var expectedUser = ScenarioCache.Get <UserModel>(ExpectedUserKey); var userResponse = ApiCaller.Post <ActionReponse <UserModel> >(expectedUser, Routes.Users); ScenarioCache.StoreActionResponse(userResponse); }
public void WhenTheCurrentUserChangesTheirName() { var usernames = ScenarioCache.Get <UserNamesModel>(ModelKeys.UserNames); var response = ApiCaller.Put <ActionReponse <ActionReponse <UserModel> > >(usernames, Routes.CurrentUserNames); ScenarioCache.StoreActionResponse(response); }
public void WhenTheTeacherUnchecksTheStudentIn() { var response = ApiCaller.Delete <ActionReponse <ClassModel> >( Routes.GetAttendClass(ScenarioCache.GetId(ModelIdKeys.ClassId), ScenarioCache.GetId(ModelIdKeys.UserId))); ScenarioCache.StoreActionResponse(response); }
public void WhenTheClassTeachersAreChanged() { var classId = ScenarioCache.GetId(ModelIdKeys.ClassId); var response = ApiCaller.Put <ActionReponse <ClassModel> >(ScenarioCache.Get <List <int> >(NewTeacherIdsKey), Routes.GetChangeClassTeachers(ScenarioCache.GetId(ModelIdKeys.ClassId))); ScenarioCache.StoreActionResponse(response); }
public void WhenTheNextBlockIsGenerated() { var response = ApiCaller.Post <ActionReponse <BlockModel> >(Routes.GetCreateNextBlock(ScenarioCache.GetId(ModelIdKeys.BlockId))); Assert.AreEqual(HttpStatusCode.Created, response.StatusCode); ScenarioCache.StoreActionResponse(response); ScenarioCache.Store(ModelIdKeys.BlockId, response.Data.ActionResult.Id); }
public void WhenTheTeacherUnchecksTheStudentIntoTheEvent() { var response = ApiCaller.Delete <ActionReponse <StandAloneEventModel> >( Routes.GetAttendEvent(ScenarioCache.GetId(ModelIdKeys.StandAloneEventId), ScenarioCache.GetId(ModelIdKeys.UserId))); ScenarioCache.StoreActionResponse(response); }
public void WhenTheUserPurchasesAPassThatDoesntExistFromATeacher() { var pass = new PassModel { PaymentStatus = PassPaymentStatus.Paid.ToString() }; var url = Routes.GetPassPurchase(ScenarioCache.GetUserId(), 2); var response = ApiCaller.Post <ActionReponse <UserModel> >(pass, url); ScenarioCache.StoreActionResponse(response); }
public void WhenTheRateForTheTeacherIsChanged() { var rate = new TeacherRateModel(100, 200); ScenarioCache.Store(ModelKeys.TeacherRate, rate); var teacherId = ScenarioCache.GetId(ModelIdKeys.TeacherId); var url = Routes.GetTeacherRatesById(teacherId); var response = ApiCaller.Post <ActionReponse <TeacherModel> >(rate, url); ScenarioCache.StoreActionResponse(response); }
public void WhenTheSettingsAreAttemptedToBeSet() { var response = ApiCaller.Post <ActionReponse <CompleteSettingsModel> >(ScenarioCache.Get <CompleteSettingsModel>(ModelKeys.CompleteSettings), Routes.Settings); ScenarioCache.StoreActionResponse(response); }
public void WhenTheRoomIsUpdated() { var response = ApiCaller.Put <ActionReponse <RoomModel> >(ScenarioCache.Get <RoomModel>(ModelKeys.Room), Routes.GetById(Routes.Room, ScenarioCache.GetId(ModelIdKeys.RoomId))); ScenarioCache.StoreActionResponse(response); }
public void WhenTheClassIsDeleted() { var response = ApiCaller.Delete <ActionReponse <ClassModel> >(Routes.GetById(Routes.Classes, ScenarioCache.GetId(ModelIdKeys.ClassId))); ScenarioCache.StoreActionResponse(response); }
public void WhenTheStandAloneEventIsUpdated() { var response = ApiCaller.Put <ActionReponse <StandAloneEventModel> >(ScenarioCache.Get <StandAloneEventModel>(ModelKeys.StandAloneEvent), Routes.GetById(Routes.StandAloneEvent, ScenarioCache.GetId(ModelIdKeys.StandAloneEventId))); ScenarioCache.StoreActionResponse(response); }
public void WhenTheOpeningHourIsAttemptedToBeCreated() { var response = ApiCaller.Post <ActionReponse <TimeSlotModel> >(ScenarioCache.Get <TimeSlotModel>(ModelKeys.OpeningHours), Routes.OpeningHours); ScenarioCache.StoreActionResponse(response); }
public void WhenTheAnnouncementIsAttemptedToBeCreated() { var response = ApiCaller.Post <ActionReponse <AnnouncementConfirmationModel> >(ScenarioCache.Get <AnnouncementModel>(ModelKeys.Announcement), Routes.Announcements); ScenarioCache.StoreActionResponse(response); }
public void WhenTheTeacherAvailabilityIsAttemptedToBeCreated() { var response = ApiCaller.Post <ActionReponse <TeacherAvailabilityModel> >(ScenarioCache.Get <TeacherAvailabilityModel>(ModelKeys.TeacherAvailability), Routes.GetCurrentTeacherAvailabilities()); ScenarioCache.StoreActionResponse(response); }
public void WhenTheRoomIsDeleted() { var response = ApiCaller.Delete <ActionReponse <RoomModel> >(Routes.GetById(Routes.Room, ScenarioCache.GetId(ModelIdKeys.RoomId))); ScenarioCache.StoreActionResponse(response); }
public void WhenTheUserAgreesToTheTermsAndConditions() { var userResponse = ApiCaller.Post <ActionReponse <UserModel> >(Routes.TermsAndConditions); ScenarioCache.StoreActionResponse(userResponse); }