Exemplo n.º 1
0
        public void TestGetTotalFutureRngPositions()
        {
            SpawnFutureRng future = new SpawnFutureRng();

            Assert.AreEqual(0, future.GetTotalFutureRngPositions());
            future.AddNextRngInstance(GetSpawnFutureRngInstance());
            Assert.AreEqual(1, future.GetTotalFutureRngPositions());
            future.AddNextRngInstance(GetSpawnFutureRngInstance());
            Assert.AreEqual(2, future.GetTotalFutureRngPositions());
        }
Exemplo n.º 2
0
        public void TestGetRngInstanceAt_ArgumentOutOfBounds()
        {
            SpawnFutureRng future = new SpawnFutureRng();

            future.AddNextRngInstance(GetSpawnFutureRngInstance());
            future.AddNextRngInstance(GetSpawnFutureRngInstance());
            Assert.ThrowsException <ArgumentOutOfRangeException>(
                delegate
            {
                future.GetRngInstanceAt(2);
            });
        }
Exemplo n.º 3
0
        public void TestGetRngInstanceAt()
        {
            SpawnFutureRng future = new SpawnFutureRng();

            future.AddNextRngInstance(GetSpawnFutureRngInstance());
            future.AddNextRngInstance(GetSpawnFutureRngInstance());
            SpawnFutureRngInstance instance = GetSpawnFutureRngInstance();

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

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

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