namespace ServicePoint.Tests; public class CommandTests { private IConnection _connection = new FakeConnection(); [Fact] public void ClearSendable() { _connection.Send(new ClearCommand()); } [Fact] public void GenericAsPacket() { var command = new ClearCommand(); Assert.Equal(command.AsPacket(), command.AsGeneric().AsPacket()); } [Fact] public void BrightnessSendable() { _connection.Send(new GlobalBrightnessCommand(5)); } [Fact] public void InvalidBrightnessThrows() { Assert.Throws(() => new GlobalBrightnessCommand(42)); } [Fact] public void FadeOutSendable() { _connection.Send(new FadeOutCommand()); } [Fact] public void HardResetSendable() { _connection.Send(new HardResetCommand()); } [Fact] public void BitmapLinearWinSendable() { _connection.Send(new BitmapCommand(0, 0, Bitmap.NewMaxSized(), CompressionCode.Uncompressed)); } }