public async Task Put_Empty_Order_WithexistingGuid_returns_BadRequest()
        {
            //existing guid
            var guid = _fixture.order.Id;
            //empty order
            var order = new Order();

            using (var client = new TestClientProvider().Client)
            {
                var         payload        = JsonConvert.SerializeObject(order);
                HttpContent content        = new StringContent(payload, Encoding.UTF8, "application/json");
                var         deleteresponse = await client.PutAsync($"/api/orders/{guid}", content);

                Assert.Equal(HttpStatusCode.BadRequest, deleteresponse.StatusCode);
            }
        }
        public async Task PutOrder_returns_Status_OK()
        {
            using (var client = new TestClientProvider().Client)
            {
                var order = _fixture.order;
                order.Phone = "123456";

                var         payload = JsonConvert.SerializeObject(order);
                HttpContent content = new StringContent(payload, Encoding.UTF8, "application/json");

                //put order
                var putresponse = await client.PutAsync($"/api/orders/{order.Id}", content);

                Assert.Equal(HttpStatusCode.OK, putresponse.StatusCode);
            }
        }
        public async Task PutOrder_returns_updatedOrder()
        {
            using (var client = new TestClientProvider().Client)
            {
                var order = _fixture.order;
                order.Status = Status.Bekräftad;

                var         payload = JsonConvert.SerializeObject(order);
                HttpContent content = new StringContent(payload, Encoding.UTF8, "application/json");

                //put order
                var putresponse = await client.PutAsync($"/api/orders/{order.Id}", content);

                var orderResponse = await putresponse.Content.ReadAsStringAsync();

                var changedOrder = JsonConvert.DeserializeObject <Order>(orderResponse);

                Assert.Equal(order.Status, changedOrder.Status);
            }
        }