public void TestThrowOnTooLargeRectangle()
        {
            ArevaloRectanglePacker packer = new ArevaloRectanglePacker(128, 128);

            Assert.Throws <OutOfSpaceException>(
                delegate() { packer.Pack(129, 129); }
                );
        }
        public void TestBarelyFittingRectangle()
        {
            ArevaloRectanglePacker packer = new ArevaloRectanglePacker(128, 128);

            Point placement = packer.Pack(128, 128);

            Assert.AreEqual(new Point(0, 0), placement);
        }
        public void TestTooLargeRectangle()
        {
            ArevaloRectanglePacker packer = new ArevaloRectanglePacker(128, 128);
            Point placement;

            bool result = packer.TryPack(129, 10, out placement);

            Assert.IsFalse(result);

            result = packer.TryPack(10, 129, out placement);
            Assert.IsFalse(result);
        }