public void MultiplyTest() { IMultiplier multiplier = new DefaultMultiplier(); CachedMultiplier cachedMultiplier = new CachedMultiplier(multiplier); int rows = 2; int columns = 3; cachedMultiplier.BuildMultiplierTable(rows, columns); int[,] expected = multiplier.BuildMultiplierTable(rows, columns); int[,] actual = cachedMultiplier.BuildMultiplierTable(rows, columns); CollectionAssert.AreEqual(expected, actual); }
public void MultiplyTest() { IMultiplier target = new DefaultMultiplier(); int rows = 2; int columns = 3; int[,] expected = new int[2, 3] { { 1, 2, 3 }, { 2, 4, 6 } }; int[,] actual = target.BuildMultiplierTable(rows, columns); CollectionAssert.AreEqual(expected, actual); }