public async Task DeleteSingleDebugTest() { //Delete var deleteResult = await _client.DeleteScheduleAsync("1"); Assert.IsNotNull(deleteResult); }
public async Task DeleteSchedule() { Schedule schedule = new Schedule(); schedule.Name = "t1"; schedule.Description = "test"; schedule.Time = DateTime.UtcNow.AddDays(1); schedule.Command = new ScheduleCommand(); schedule.Command.Body = new LightCommand(); schedule.Command.Body.Alert = Alert.Once; schedule.Command.Address = "/api/huelandspoor/lights/5/state"; schedule.Command.Method = "PUT"; var scheduleId = await _client.CreateScheduleAsync(schedule); //Delete await _client.DeleteScheduleAsync(scheduleId); }
public async Task DeleteSchedule() { Schedule schedule = new Schedule(); schedule.Name = "t1"; schedule.Description = "test"; schedule.LocalTime = new HueDateTime() { DateTime = DateTime.UtcNow.AddDays(1) }; schedule.Command = new InternalBridgeCommand(); var commandBody = new LightCommand(); commandBody.Alert = Alert.Once; schedule.Command.Body = commandBody; schedule.Command.Address = "/api/huelandspoor/lights/5/state"; schedule.Command.Method = HttpMethod.Put; var scheduleId = await _client.CreateScheduleAsync(schedule); //Delete await _client.DeleteScheduleAsync(scheduleId); }