示例#1
0
        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));
        }
示例#2
0
        public void WhenUserIsSetUpAsATeacher()
        {
            WhenUserIsAttemptedToBeSetUpAsATeacher();

            Assert.AreEqual(HttpStatusCode.Created, ScenarioCache.GetResponseStatus());

            var teacher = ScenarioCache.GetActionResponse <TeacherModel>();

            ScenarioCache.Store(ModelIdKeys.TeacherId, teacher.Id);
        }
示例#3
0
        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);
        }
示例#5
0
        public void WhenABlockIsRetrievedById()
        {
            var response = ApiCaller.Get <BlockModel>(Routes.GetById(Routes.Blocks, ScenarioCache.GetActionResponse <BlockModel>().Id));

            ScenarioCache.Store(ModelKeys.Response, response.StatusCode);
        }
示例#6
0
        public void WhenAPassTemplateIsRetrievedById()
        {
            var response = ApiCaller.Get <PassTemplateModel>(Routes.GetPassTemplateById(ScenarioCache.GetActionResponse <PassTemplateModel>().Id));

            ScenarioCache.Store(ModelKeys.Response, response.StatusCode);
        }