public async void TurnOnSingleLightWithConfirm(LightColor color) { SignaworksEthernetStackLightUnmanaged light = new SignaworksEthernetStackLightUnmanaged(StackLightIPForTest, port: 20000); light.Connect(); Assert.True(light.Connected); await light.TurnLightOnWithConfirmAsync(color); Assert.Equal(LightState.On, await light.GetLightStateCurrentAsync(color)); Task.Delay(1000).Wait(); await light.TurnLightOffWithConfirmAsync(color); light.Close(); Assert.False(light.Connected); }
public async void TurnAllColorsOnOff1SecondWithConfirm() { SignaworksEthernetStackLightUnmanaged light = new SignaworksEthernetStackLightUnmanaged(StackLightIPForTest, port: 20000); light.Connect(); Assert.True(light.Connected); foreach (var color in EnumIterator.GetValues <LightColor>()) { await light.TurnLightOnWithConfirmAsync(color); } await Task.Delay(1000); foreach (var color in EnumIterator.GetValues <LightColor>()) { await light.TurnLightOffWithConfirmAsync(color); } light.Close(); Assert.False(light.Connected); }