コード例 #1
0
        public void TestIsPointInsideFalse()
        {
            BeetliData beetli = new BeetliData();

            beetli.BeetliLeft   = 10;
            beetli.BeetliWidth  = 10;
            beetli.BeetliTop    = 30;
            beetli.BeetliHeight = 20;

            Assert.AreEqual(false, beetli.IsPointInside(10, 30));
            Assert.AreEqual(false, beetli.IsPointInside(20, 30));
            Assert.AreEqual(false, beetli.IsPointInside(10, 50));
            Assert.AreEqual(false, beetli.IsPointInside(20, 50));
        }
コード例 #2
0
        public void TestIsPointInsideTrue()
        {
            BeetliData beetli = new BeetliData();

            beetli.BeetliLeft   = 10;
            beetli.BeetliWidth  = 10;
            beetli.BeetliTop    = 30;
            beetli.BeetliHeight = 20;

            Assert.AreEqual(true, beetli.IsPointInside(11, 31));
            Assert.AreEqual(true, beetli.IsPointInside(19, 31));
            Assert.AreEqual(true, beetli.IsPointInside(11, 49));
            Assert.AreEqual(true, beetli.IsPointInside(19, 49));
        }