public void Floor_Post_Should_Return_Not_Found_Response()
        {
            var model = new FloorPostViewModel();

            _floorController.Request = new HttpRequestMessage();
            _floorController.Request.SetConfiguration(new HttpConfiguration());
            _floorController.Validate(model);

            var response = _floorController.Put(model);

            Assert.AreEqual(HttpStatusCode.NotFound, response.StatusCode);
        }
        public void Floor_Post_Should_Return_Ok_Response()
        {
            var model = new FloorPostViewModel
            {
                Name      = "blablabla",
                PictureId = "1"
            };

            _floorController.Request = new HttpRequestMessage();
            _floorController.Request.SetConfiguration(new HttpConfiguration());
            _floorController.Validate(model);

            var response = _floorController.Post(model);

            Assert.AreEqual(HttpStatusCode.Created, response.StatusCode);
        }
Beispiel #3
0
        public async Task Floor_Put_Should_Return_Ok_Response()
        {
            var model = new FloorPostViewModel
            {
                Id        = 1,
                Name      = "TestFloor",
                PictureId = "1"
            };

            _floorController.Request = new HttpRequestMessage();
            _floorController.Request.SetConfiguration(new HttpConfiguration());
            _floorController.Validate(model);

            var response = await _floorController.Put(model);

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