public void GetBottomLeft_Driver() { var response = FlutterDriver.GetBottomLeft(Control); response.Dx.Should().BeGreaterThan(0); response.Dy.Should().BeGreaterThan(0); }
public void GetPosition_ValuesAreCongruent_ByDriver() { // If other tests fail in this class: fix those first. var topLeft = FlutterDriver.GetTopLeft(Control); var topRight = FlutterDriver.GetTopRight(Control); var bottomLeft = FlutterDriver.GetBottomLeft(Control); var bottomRight = FlutterDriver.GetBottomRight(Control); var center = FlutterDriver.GetCenter(Control); // The bounding box is a square topLeft.Dx.Should().Be(bottomLeft.Dx, because: "the left boundary is a straight vertical line"); topRight.Dx.Should().Be(bottomRight.Dx, because: "the right boundary is a straiight vertical line"); topLeft.Dy.Should().Be(topRight.Dy, because: "the top boundary is a straight horizontal line"); bottomLeft.Dy.Should().Be(bottomRight.Dy, because: "the bottom boundary is a straight horizontal line"); topLeft.Dx.Should().BeLessThan(center.Dx, "thats just the way a square rocks and rolls"); topLeft.Dy.Should().BeLessThan(center.Dy, "thats just the way a square rocks and rolls"); bottomLeft.Dx.Should().BeLessThan(center.Dx, "thats just the way a square rocks and rolls"); bottomLeft.Dy.Should().BeGreaterThan(center.Dy, "thats just the way a square rocks and rolls (using (X,Y) == (0,0) coords"); topRight.Dx.Should().BeGreaterThan(center.Dx, "thats just the way a square rocks and rolls"); topRight.Dy.Should().BeLessThan(center.Dy, "thats just the way a square rocks and rolls"); bottomRight.Dx.Should().BeGreaterThan(center.Dx, "thats just the way a square rocks and rolls"); bottomRight.Dy.Should().BeGreaterThan(center.Dy, "thats just the way a square rocks and rolls"); }