예제 #1
0
        public void TestGetTotalFutureRngPositions()
        {
            ChestFutureRng future = new ChestFutureRng();

            Assert.AreEqual(0, future.GetTotalFutureRngPositions());
            future.AddNextRngInstance(GetChestFutureRngInstance());
            Assert.AreEqual(1, future.GetTotalFutureRngPositions());
            future.AddNextRngInstance(GetChestFutureRngInstance());
            Assert.AreEqual(2, future.GetTotalFutureRngPositions());
        }
예제 #2
0
        public void TestGetRngInstanceAt_ArgumentOutOfBounds()
        {
            ChestFutureRng future = new ChestFutureRng();

            future.AddNextRngInstance(GetChestFutureRngInstance());
            future.AddNextRngInstance(GetChestFutureRngInstance());
            Assert.ThrowsException <ArgumentOutOfRangeException>(
                delegate
            {
                future.GetRngInstanceAt(2);
            });
        }
예제 #3
0
        public void TestGetRngInstanceAt()
        {
            ChestFutureRng future = new ChestFutureRng();

            future.AddNextRngInstance(GetChestFutureRngInstance());
            future.AddNextRngInstance(GetChestFutureRngInstance());
            ChestFutureRngInstance instance = GetChestFutureRngInstance();

            instance.Index       = 5;
            instance.CurrentHeal = 9999;

            future.AddNextRngInstance(instance);
            ChestFutureRngInstance copy = future.GetRngInstanceAt(2);

            Assert.AreEqual(instance.Index, copy.Index);
            Assert.AreEqual(instance.CurrentHeal, copy.CurrentHeal);
        }