public void TestForPLCProvideGoods() { var actual = new ProvideGoods(2, 1, 1, 5).ToByteArray(); byte[] expected = new byte[13] { 0x0c, 0x01, 0x02, 0x01, 0x02, 0x01, 0x00, 0x00, 0x00, 0x01, 0x7c, 0x05, 0x01 }; Assert.Equal(expected, actual); }
public void TestForPLCProvideGoods() { var actual = new ProvideGoods(new byte[13] { 0x0c, 0x01, 0x02, 0x01, 0x02, 0x01, 0x00, 0x00, 0x00, 0x01, 0x7c, 0x05, 0x01 }); Assert.Equal <byte?>(1, actual.CommandNo); Assert.Equal <byte?>(2, actual.LineNo); Assert.Equal <byte?>(1, actual.TableNo); Assert.Equal(1, actual.Index); Assert.Equal <byte?>(5, actual.BlockNo); }