Пример #1
0
        public void WhenUserIsSetUpAsATeacher()
        {
            WhenUserIsAttemptedToBeSetUpAsATeacher();

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

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

            ScenarioCache.Store(ModelIdKeys.TeacherId, teacher.Id);
        }
Пример #2
0
 public void ThenValidationErrorsAreReturned()
 {
     Assert.AreEqual(HttpStatusCode.BadRequest, ScenarioCache.GetResponseStatus());
     Assert.IsFalse(ScenarioCache.GetValidationResult().IsValid);
 }
Пример #3
0
        public void ThenTheRequestReturnsNotFound()
        {
            var httpStatusCode = ScenarioCache.GetResponseStatus();

            Assert.AreEqual(HttpStatusCode.NotFound, httpStatusCode);
        }
Пример #4
0
        public void ThenTheRequestIsUnsuccessful()
        {
            var httpStatusCode = ScenarioCache.GetResponseStatus();

            Assert.AreEqual(HttpStatusCode.BadRequest, httpStatusCode);
        }
Пример #5
0
        public void ThenTheRequestIsSuccessful()
        {
            var httpStatusCode = ScenarioCache.GetResponseStatus();

            Assert.Contains(httpStatusCode, new[] { HttpStatusCode.OK, HttpStatusCode.Created });
        }
Пример #6
0
 public void ThenCheckInIsSuccessful()
 {
     Assert.AreEqual(HttpStatusCode.OK, ScenarioCache.GetResponseStatus());;
 }