public void GivenILoginAsAAPIUser()
        {
            // auth/login not returning the expected token for [email protected] but instead auth/register is used
            var    path     = "auth/register";
            var    data     = new User();
            string payload  = JsonHelpers.ConvertObjToJson(data);
            var    response = APIHelpers.PostRequest(path, payload);

            token = JsonHelpers.GetJsonKeyValue(response.Content, "access_token");
        }
        public void WhenIUpdateALocationToForId(string location, string Id)
        {
            var path = string.Format("locations/{0}", Id);
            var data = new Location()
            {
                name = location
            };
            string payload = JsonHelpers.ConvertObjToJson(data);

            APIHelpers.PutRequest(path, payload, token);
        }
        public void WhenIAddANewLocation(string location)
        {
            var path = "locations";
            var data = new Location()
            {
                name = location
            };
            string payload = JsonHelpers.ConvertObjToJson(data);

            APIHelpers.PostRequest(path, payload, token);
        }