public void ClearingForBytes() { byte[] data = { 2, 3, 4, 5 }; CheckSumDataCRC32 csData = new CheckSumDataCRC32(data); Assert.IsNotNull(csData); csData.Clear(); byte[] byData = csData.GetAsByteArray(); Assert.IsNull(byData); }
public void GetBytesFromBytes() { byte[] data = { 2, 3, 4, 5 }; CheckSumDataCRC32 csData = new CheckSumDataCRC32(data); Assert.IsNotNull(csData); byte[] byData = csData.GetAsByteArray(); Assert.IsNotNull(byData); Assert.AreEqual(byData.Length, CheckSumDataCRC32.Length); Assert.AreEqual(data, byData); }
public void GetBytesFromString() { string data = "02030405"; CheckSumDataCRC32 csData = new CheckSumDataCRC32(data); Assert.IsNotNull(csData); byte[] byData = csData.GetAsByteArray(); byte[] veData = { 2, 3, 4, 5 }; Assert.IsNotNull(byData); Assert.AreEqual(byData.Length, CheckSumDataCRC32.Length); Assert.AreEqual(veData, byData); }