Exemplo n.º 1
0
        public void ContainsVectorTest()
        {
            CartesianBounds subject;
            Vector          obj;

            subject = new CartesianBounds(3, 3, 10, 10);
            obj     = new Vector(5, 5);
            Assert.IsTrue(subject.Contains(obj));

            obj = new Vector(50, 50);
            Assert.IsFalse(subject.Contains(obj));
        }
Exemplo n.º 2
0
        public void ContainsBoundsTest()
        {
            CartesianBounds subject, obj;

            subject = new CartesianBounds(3, 3, 10, 10);
            obj     = new CartesianBounds(5, 5, 3, 3);
            Assert.IsTrue(subject.Contains(obj));

            obj = new CartesianBounds(1, 1, 50, 50);
            Assert.IsFalse(subject.Contains(obj));

            obj = new CartesianBounds(1, 1, 5, 5);
            Assert.IsFalse(subject.Contains(obj));

            obj = new CartesianBounds(100, 100, 10, 10);
            Assert.IsFalse(subject.Contains(obj));
        }