public void CRC_ComputeCRC_Insufficient_Length() { var namedProp = IntegrationUtil.GetMockNamedProperty(); var bytes = Encoding.Unicode.GetBytes(namedProp.Name); uint test = CRC.ComputeCRC(bytes, CRCMockConstants.INSUFFICIENT_CRC_LENGTH); Assert.AreEqual(CRCMockConstants.EXPECTED_INSUFFICIENT_LENGTH_CRC, test); }
public void CRC_ComputeCRC_Valid() { var namedProp = IntegrationUtil.GetMockNamedProperty(); var bytes = Encoding.Unicode.GetBytes(namedProp.Name); uint test = CRC.ComputeCRC(bytes, (uint)bytes.Length); Assert.AreEqual(CRCMockConstants.EXPECTED_CRC, test); }