Пример #1
0
        public async Task SetUp()
        {
            saController     = new SurveyAnswerController();
            sqController     = new SurveyQuestionController();
            surveyController = new SurveyController();

            survey = new Survey("test survey");
            await surveyController.PutSurvey(survey);

            surveyQuestion = new SurveyQuestion(survey.SurveyId, 1, "test question");
            await sqController.PutSurveyQuestion(surveyQuestion);

            surveyAnswer = new SurveyAnswer(surveyQuestion.SurveyQuestionId, 4);
        }
        public async Task Assert_put_surveyquestion()
        {
            IHttpActionResult result = await sqController.PutSurveyQuestion(surveyQuestion);

            Assert.IsInstanceOf(typeof(OkNegotiatedContentResult <SurveyQuestion>), result);
        }