public void ThenUserIsNotCreated() { var allUsersResponse = ApiCaller.Get <List <UserModel> >(Routes.Users); Assert.AreEqual(allUsersResponse.StatusCode, HttpStatusCode.OK); var user = ScenarioCache.GetActionResponse <UserModel>(); Assert.IsFalse(allUsersResponse.Data.Any(x => x.FullName == user.FullName)); }
public void WhenUserIsSetUpAsATeacher() { WhenUserIsAttemptedToBeSetUpAsATeacher(); Assert.AreEqual(HttpStatusCode.Created, ScenarioCache.GetResponseStatus()); var teacher = ScenarioCache.GetActionResponse <TeacherModel>(); ScenarioCache.Store(ModelIdKeys.TeacherId, teacher.Id); }
public void WhenATeacherIsRetrievedById() { var response = ApiCaller.Get <TeacherModel>(Routes.GetTeacherById(ScenarioCache.GetActionResponse <TeacherModel>().Id)); ScenarioCache.Store(ModelKeys.Response, response.StatusCode); }
public void ThenAnEmailWasSentToUsers(int numberOfUsersEmailed) { var announcementConfirmation = ScenarioCache.GetActionResponse <AnnouncementConfirmationModel>(); Assert.AreEqual(numberOfUsersEmailed, announcementConfirmation.NumberOfUsersEmailed); }
public void WhenABlockIsRetrievedById() { var response = ApiCaller.Get <BlockModel>(Routes.GetById(Routes.Blocks, ScenarioCache.GetActionResponse <BlockModel>().Id)); ScenarioCache.Store(ModelKeys.Response, response.StatusCode); }
public void WhenAPassTemplateIsRetrievedById() { var response = ApiCaller.Get <PassTemplateModel>(Routes.GetPassTemplateById(ScenarioCache.GetActionResponse <PassTemplateModel>().Id)); ScenarioCache.Store(ModelKeys.Response, response.StatusCode); }