Esempio n. 1
0
        /// <summary>
        /// Update that new sensor's name to "TEST: c#-api-sensor-update". Also update its location.
        /// </summary>
        /// <param name="sensorId">The Id of the inserted sensor</param>
        private static async Task UpdateSensor(string sensorId)
        {
            Console.WriteLine("Testing '/api/sensor/update'");

            // Sample JSON to send
            JObject json = new JObject {
                ["sensorId"]     = sensorId,
                ["parkingSpace"] = "TEST: c#-api-sensor-update",
                ["latitude"]     = 33.810280507079874,
                ["longitude"]    = -117.9189795255661
            };

            await SensorApi.UpdateSensor(json.ToString());

            Console.WriteLine("Sensor Update Success\n");
        }