2024-11-03 11:12:40 +01:00
|
|
|
namespace ServicePoint.Tests;
|
|
|
|
|
|
|
|
public class CommandTests
|
|
|
|
{
|
|
|
|
private Connection _connection = Connection.NewFake();
|
|
|
|
|
|
|
|
[Fact]
|
|
|
|
public void ClearSendable()
|
|
|
|
{
|
|
|
|
_connection.Send(Command.Clear());
|
|
|
|
}
|
|
|
|
|
|
|
|
[Fact]
|
|
|
|
public void BrightnessSendable()
|
|
|
|
{
|
|
|
|
_connection.Send(Command.Brightness(5));
|
|
|
|
}
|
|
|
|
|
|
|
|
[Fact]
|
|
|
|
public void InvalidBrightnessThrows()
|
|
|
|
{
|
|
|
|
Assert.Throws<ServicePointException.InvalidBrightness>(() => Command.Brightness(42));
|
|
|
|
}
|
|
|
|
|
|
|
|
[Fact]
|
|
|
|
public void FadeOutSendable()
|
|
|
|
{
|
|
|
|
_connection.Send(Command.FadeOut());
|
|
|
|
}
|
|
|
|
|
|
|
|
[Fact]
|
|
|
|
public void HardResetSendable()
|
|
|
|
{
|
|
|
|
_connection.Send(Command.HardReset());
|
|
|
|
}
|
2024-11-04 19:20:40 +01:00
|
|
|
|
|
|
|
[Fact]
|
|
|
|
public void BitmapLinearWinSendable()
|
|
|
|
{
|
2024-11-10 15:08:39 +01:00
|
|
|
_connection.Send(Command.BitmapLinearWin(0, 0, Bitmap.NewMaxSized(), CompressionCode.Uncompressed));
|
2024-11-04 19:20:40 +01:00
|
|
|
}
|
2024-11-03 11:12:40 +01:00
|
|
|
}
|