[TestCase(50, 50)] // less than 10% visibility public void IsDisplayedOn10Percent_should_return_true_if_window_fully_fit_on_screen(int width, int height) { Rectangle screen = new(0, 0, 1920, 1080); Rectangle window = new(0, 0, width, height); WindowPositionManagerTestAccessor.IsDisplayedOn10Percent(screen, window) .Should().BeTrue(); }
[TestCase(-2700, 100, 5000, 500, false)] // unexpected case! neither left-middle-rights points are visible public void IsDisplayedOn10Percent_should_return_expected_if_window_partially_fit_on_screen(int x, int y, int width, int height, bool expected) { Rectangle screen = new(0, 0, 1920, 1080); Rectangle window = new(x, y, width, height); WindowPositionManagerTestAccessor.IsDisplayedOn10Percent(screen, window) .Should().Be(expected); }
public void IsDisplayedOn10Percent_should_return_false_if_no_window_supplied() { WindowPositionManagerTestAccessor.IsDisplayedOn10Percent(new Rectangle(1, 1, 1, 1), Rectangle.Empty) .Should().BeFalse(); }