Example #1
0
        public void TestGetSpawnDirectionsCount()
        {
            SpawnFutureRng future = new SpawnFutureRng();

            Assert.AreEqual(0, future.GetSpawnDirectionsCount());
            future.AddSpawnDirections(GetSpawnDirections());
            Assert.AreEqual(1, future.GetSpawnDirectionsCount());
            future.AddSpawnDirections(GetSpawnDirections());
            Assert.AreEqual(2, future.GetSpawnDirectionsCount());
        }
Example #2
0
        public void TestGetSpawnDirectionsAt_ArgumentOutOfBounds()
        {
            SpawnFutureRng future = new SpawnFutureRng();

            future.AddSpawnDirections(GetSpawnDirections());
            future.AddSpawnDirections(GetSpawnDirections());
            future.AddSpawnDirections(GetSpawnDirections());
            Assert.ThrowsException <ArgumentOutOfRangeException>(
                delegate
            {
                future.GetSpawnDirectionsAtIndex(3);
            });
        }
Example #3
0
        public void TestGetSpawnDirectionsAt()
        {
            SpawnFutureRng future = new SpawnFutureRng();

            future.AddSpawnDirections(GetSpawnDirections());
            future.AddSpawnDirections(GetSpawnDirections());
            future.AddSpawnDirections(GetSpawnDirections());
            SpawnDirections directions = GetSpawnDirections();

            directions.Directions = 7;

            future.AddSpawnDirections(directions);
            SpawnDirections copy = future.GetSpawnDirectionsAtIndex(3);

            Assert.AreEqual(directions.Directions, copy.Directions);
        }