public void GetCoordsForArrayIndices_WhenArgumentsAreValid_ExpectSuccessMapping() { // Arrange _arrayIndicesArgument = new Indices(6, 3); _gridCoordsResponse = new GridCoords(7, "D"); // Act var result = ArrayMapper.GetCoordsForArrayIndices(_arrayIndicesArgument); // Assert Assert.IsInstanceOfType(result, typeof(GridCoords)); Assert.AreEqual(this._gridCoordsResponse.X, result.X); Assert.AreEqual(this._gridCoordsResponse.Y, result.Y); }
public void GetCoordsForArrayIndices_WhenIndicesAreInvalid_ExpectArgumentException() { // Arrange _arrayIndicesArgument = null; // Act try { var result = ArrayMapper.GetCoordsForArrayIndices(_arrayIndicesArgument); } catch (Exception ex) { // Assert Assert.IsInstanceOfType(ex, typeof(ArgumentNullException)); throw; } }