public async Task PUT_Updates_Data()
        {
            var controller = new UnitOfMeasuresController(Context);

            ConfigureRequest(controller);

            var model = new UnitOfMeasureModel
            {
                Id           = Guid.Parse("{69EA67A4-C575-472B-B463-C156E5BA61F3}"),
                Name         = "Test No Id",
                Abbreviation = "TNI"
            };

            //setup database record
            Context.UnitsOfMeasure.Add(new UnitOfMeasure
            {
                Id           = model.Id,
                Name         = model.Name,
                Abbreviation = model.Abbreviation
            });
            Context.SaveChanges();

            model.Name         = "My New Name";
            model.Abbreviation = "MNN";

            var result = await GetData <UnitOfMeasureModel>(controller.Put(model));

            Assert.AreEqual(model.Name, result.Name);
            Assert.AreEqual(model.Abbreviation, result.Abbreviation);
        }
        public async Task PUT_Is_OK()
        {
            var controller = new UnitOfMeasuresController(Context);

            ConfigureRequest(controller);

            var model = new UnitOfMeasureModel
            {
                Id           = Guid.Parse("{69EA67A4-C575-472B-B463-C156E5BA61F3}"),
                Name         = "Test No Id",
                Abbreviation = "TNO"
            };

            //setup database record
            Context.UnitsOfMeasure.Add(new UnitOfMeasure
            {
                Id           = model.Id,
                Name         = model.Name,
                Abbreviation = model.Abbreviation
            });
            Context.SaveChanges();

            var result = await GetResponse(controller.Put(model));

            Assert.AreEqual(HttpStatusCode.OK, result.StatusCode);
        }
        public async Task PUT_Is_Bad_Request_Null_Data()
        {
            var controller = new UnitOfMeasuresController(Context);

            ConfigureRequest(controller);

            var result = await GetResponse(controller.Put(null));

            Assert.AreEqual(HttpStatusCode.BadRequest, result.StatusCode);
        }
        public async Task PUT_Is_Bad_Request_Missing_Id()
        {
            var controller = new UnitOfMeasuresController(Context);

            ConfigureRequest(controller);

            var model = new UnitOfMeasureModel {
                Name = "Test No Id"
            };

            var result = await GetResponse(controller.Put(model));

            Assert.AreEqual(HttpStatusCode.BadRequest, result.StatusCode);
        }