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); }
protected virtual void SetRectsDependentCalculators() { thisGroupElementAtPositionInGroupSpaceCalculator = new GroupElementAtPositionInGroupSpaceCalculator( thisElementsArray, thisElementLength, thisPadding, thisUIA.GetRect().size, GetName() ); }
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)); }