Пример #1
0
        public void ContainsInverse()
        {
            Assert.IsTrue(rectD.ContainsOpen(rectD.TopLeft));
            Assert.IsFalse(rectD.ContainsOpen(rectD.TopRight));
            Assert.IsFalse(rectD.ContainsOpen(rectD.BottomLeft));
            Assert.IsFalse(rectD.ContainsOpen(rectD.BottomRight));
            Assert.IsTrue(rectD.Contains(3, 4));
            Assert.IsFalse(rectD.ContainsOpen(0, 1));

            Assert.IsTrue(rectF.ContainsOpen(rectF.TopLeft));
            Assert.IsFalse(rectF.ContainsOpen(rectF.TopRight));
            Assert.IsFalse(rectF.ContainsOpen(rectF.BottomLeft));
            Assert.IsFalse(rectF.ContainsOpen(rectF.BottomRight));
            Assert.IsTrue(rectF.Contains(3, 4));
            Assert.IsFalse(rectF.ContainsOpen(0, 1));

            Assert.IsTrue(rectI.ContainsClosed(rectI.TopLeft));
            Assert.IsTrue(rectI.ContainsClosed(rectI.TopRight));
            Assert.IsTrue(rectI.ContainsClosed(rectI.BottomLeft));
            Assert.IsTrue(rectI.ContainsClosed(rectI.BottomRight));
            Assert.IsTrue(rectI.Contains(3, 4));
            Assert.IsFalse(rectI.ContainsClosed(0, 1));
        }