public void SumByteArrays_Three_Arrays_Result_Array_Not_Big_Enough() { // arrange byte[] first = { 6, 6, 6 }; byte[] second = { 1, 2 }; byte[] third = { 3, 0, 1, 5, 9 }; byte[] actual = new byte[first.Length + second.Length + third.Length - 2]; // act Log9KUtil.SumByteArrays(ref actual, first, second, third); // assert is handled by the ExpectedException }
public void SumByteArrays_Three_Arrays() { // arrange byte[] first = { 6, 6, 6 }; byte[] second = { 1, 2 }; byte[] third = { 3, 0, 1, 5, 9 }; byte[] expected = { 6, 6, 6, 1, 2, 3, 0, 1, 5, 9 }; byte[] actual = new byte[first.Length + second.Length + third.Length]; // act Log9KUtil.SumByteArrays(ref actual, first, second, third); // assert CollectionAssert.AreEqual(expected, actual); }