Esempio n. 1
0
        public void QualificationLevel_Post_Should_Return_Created_Entity_If_Saved_Successfully()
        {
            QualificationLevelPostViewModel model = new QualificationLevelPostViewModel();

            model.Id        = 0;
            model.Name      = "test";
            model.SortOrder = 0;
            _qualificationLevelController.Validate(model);
            HttpResponseMessage response = _qualificationLevelController.Post(model);

            Assert.AreEqual(HttpStatusCode.Created, response.StatusCode);
        }
        public async Task QualificationLevel_Post_Should_Return_Created_Entity_If_Saved_Successfully()
        {
            var model = new QualificationLevelPostViewModel
            {
                Id        = 0,
                Name      = "test",
                SortOrder = 0
            };

            _qualificationLevelController.Validate(model);
            var response = await _qualificationLevelController.Post(model);

            Assert.AreEqual(HttpStatusCode.Created, response.StatusCode);
        }