Example #1
0
        public void TestGetAdvanceDirectionsCount()
        {
            ChestFutureRng future = new ChestFutureRng();

            Assert.AreEqual(0, future.GetAdvanceDirectionsCount());
            future.AddAdvanceDirections(GetAdvanceDirections());
            Assert.AreEqual(1, future.GetAdvanceDirectionsCount());
            future.AddAdvanceDirections(GetAdvanceDirections());
            Assert.AreEqual(2, future.GetAdvanceDirectionsCount());
        }
Example #2
0
        public void TestGetAdvanceDirectionsAt_ArgumentOutOfBounds()
        {
            ChestFutureRng future = new ChestFutureRng();

            future.AddAdvanceDirections(GetAdvanceDirections());
            future.AddAdvanceDirections(GetAdvanceDirections());
            future.AddAdvanceDirections(GetAdvanceDirections());
            Assert.ThrowsException <ArgumentOutOfRangeException>(
                delegate
            {
                future.GetAdvanceDirectionsAtIndex(3);
            });
        }
Example #3
0
        public void TestGetAdvanceDirectionsAt()
        {
            ChestFutureRng future = new ChestFutureRng();

            future.AddAdvanceDirections(GetAdvanceDirections());
            future.AddAdvanceDirections(GetAdvanceDirections());
            future.AddAdvanceDirections(GetAdvanceDirections());
            AdvanceDirections directions = GetAdvanceDirections();

            directions.AdvanceForItem  = 7;
            directions.AdvanceToAppear = 24;

            future.AddAdvanceDirections(directions);
            AdvanceDirections copy = future.GetAdvanceDirectionsAtIndex(3);

            Assert.AreEqual(directions.AdvanceForItem, copy.AdvanceForItem);
            Assert.AreEqual(directions.AdvanceToAppear, copy.AdvanceToAppear);
        }