public void CreatePatternSize2Test() { //arrange //act int[][] test = new int[1][]; test[0] = new int[] { 0 }; string hashCode = HashCodeCalculator.CalculateHashCode(test); Pattern patternTEst = new Pattern(test, hashCode, 3); Debug.Log("Value at (0, 0) " + patternTEst.GetGridValue(0, 0)); //assert Assert.True(patternTEst != null && patternTEst.GetGridValue(0, 0) == 0); }
public void CreatePatternSize2TestFail() { //arrange //IValue<TileBase> value = Substitute.For<TileBaseValue>(); //act //assert Assert.Throws <System.IndexOutOfRangeException>(() => pattern.GetGridValue(2, 2)); }