Beispiel #1
0
        public void TestInverseMapping1()
        {
            int val = SeatHelper.InverseMapping(2, 1, 4);

            Assert.AreEqual(val, 3);

            val = SeatHelper.InverseMapping(3, 1, 4);
            Assert.AreEqual(val, 0);

            val = SeatHelper.InverseMapping(3, 3, 4);
            Assert.AreEqual(val, 2);

            val = SeatHelper.InverseMapping(3, 0, 4);
            Assert.AreEqual(val, 3);
        }
Beispiel #2
0
        public void TestInverseMapping()
        {
            // 2
            int val = SeatHelper.InverseMapping(1, 1, 4);

            Assert.AreEqual(val, 2);

            val = SeatHelper.InverseMapping(1, 2, 4);
            Assert.AreEqual(val, 3);

            val = SeatHelper.InverseMapping(1, 3, 4);
            Assert.AreEqual(val, 0);

            val = SeatHelper.InverseMapping(1, 0, 4);
            Assert.AreEqual(val, 1);
        }