public void CalculateEccOfData_ShouldReturnCorrectEccForGivenData(byte[] data, byte[] expectedEcc) { // Act var ecc = ErrorCorrection.CalculateEcc(data, (byte)expectedEcc.Length); // Assert ecc.Should().BeEquivalentTo(expectedEcc); }
public void CalculateEccOfData_ShouldReturnCorrectEccForGivenData(byte[] data, byte[] expectedResult) { // Arrange CodeSize size = CodeSizes.All.FirstOrDefault(x => x.DataCodewords >= data.Length) ?? throw new InvalidOperationException("Size not found"); // Act byte[] result = ErrorCorrection.CalculateEcc(data, size); // Assert result.Should().BeEquivalentTo(expectedResult); }