public void NotAllPropertiesSet3() { Ssm2ReadAddressesResponse p = new Ssm2ReadAddressesResponse(); p.Destination = Ssm2Device.Engine10; p.Source = Ssm2Device.DiagnosticToolF0; p.Finish(); }
public void NotAllPropertiesSet1() { Ssm2ReadAddressesResponse p = new Ssm2ReadAddressesResponse(); p.Source = Ssm2Device.DiagnosticToolF0; p.Data = new byte[] { 0 }; p.Finish(); }
public void NotAllPropertiesSet2() { Ssm2ReadAddressesResponse p = new Ssm2ReadAddressesResponse(); p.Destination = Ssm2Device.Engine10; p.Data = new byte[] { 0, 1, 2, 3, 4, 5 }; p.Finish(); }
public void Construct2() { byte[] packetData = TestPacket2; Ssm2ReadAddressesResponse p = new Ssm2ReadAddressesResponse(); p.Destination = Ssm2Device.DiagnosticToolF0; p.Source = Ssm2Device.Engine10; p.Data = TestPacket2Data; // should be ok after setting Data Assert.AreEqual(packetData.Length, p.Size, "Size before Construct"); p.Finish(); byte[] actual = p.ToBytesCopy(); for (int i = 0; i < packetData.Length; i++) { Assert.AreEqual(packetData[i], actual[i], "actual[" + i.ToString() + "]"); } Assert.AreEqual(packetData.Length, p.Size, "Size"); Assert.AreEqual(true, p.Check(), "Check"); Assert.AreEqual(Ssm2Device.DiagnosticToolF0, p.Destination, "Destination"); Assert.AreEqual(Ssm2Device.Engine10, p.Source, "Source"); Assert.AreEqual(Ssm2Command.ReadAddressesResponseE8, p.Command, "Command"); IList <byte> data = p.Data; Assert.AreEqual(2, data.Count, "DataList.Count"); Assert.AreEqual(2, p.DataCount, "DataCount"); for (int i = 0; i < data.Count; i++) { Assert.AreEqual(TestPacket2Data[i], data[i], "data[" + i.ToString() + "]"); } }