public void Calculate_ModuloNonZero_SmallerThanPaddingPlusMargin_ReturnsNull(Vector2 position)
    {
        IUIElement[,] array;
        IGroupElementAtPositionInGroupSpaceCalculator calculator = CreateCalculator(out array);

        IUIElement actual = calculator.Calculate(position);

        Assert.That(actual, Is.Null);
    }
    public void Calculate_PositionOutOfBounds_ReturnsNull(Vector2 position)
    {
        IUIElement[,] array;
        IGroupElementAtPositionInGroupSpaceCalculator calculator = CreateCalculator(out array);

        IUIElement actual = calculator.Calculate(position);

        Assert.That(actual, Is.Null);
    }
    public void Calculate_ModuloNonZero_NotSmallerThanPaddingPlusMargin_ReturnsElementAtPos(Vector2 position, int[] expectedArrayIndex)
    {
        IUIElement[,] array;
        IGroupElementAtPositionInGroupSpaceCalculator calculator = CreateCalculator(out array);

        IUIElement actual = calculator.Calculate(position);

        IUIElement expected = array[expectedArrayIndex[0], expectedArrayIndex[1]];

        Assert.That(actual, Is.SameAs(expected));
    }
    public void Calculate_ModuloZero_ReturnsElementAtPos(Vector2 position, int[] expectedArrayIndex)
    {
        /*  pointer at the greater edge
         */
        IUIElement[,] array;
        IGroupElementAtPositionInGroupSpaceCalculator calculator = CreateCalculator(out array);

        IUIElement actual = calculator.Calculate(position);

        IUIElement expected = array[expectedArrayIndex[0], expectedArrayIndex[1]];

        Assert.That(actual, Is.SameAs(expected));
    }
 public IUIElement GetGroupElementAtPositionInGroupSpace(Vector2 positionInElementGroupSpace)
 {
     return(thisGroupElementAtPositionInGroupSpaceCalculator.Calculate(positionInElementGroupSpace));
 }