AddRandomObject() public method

public AddRandomObject ( ) : void
return void
        public void LiftObjectsTest()
        {
            Spaceship spaceship = new Spaceship();
            spaceship.X = 49;
            spaceship.Width = 200;
            GameObjectsManager manager = new GameObjectsManager(new Spaceship(), new Random());
            manager.AddRandomObject();
            manager.LiftObjects(spaceship);
            manager.Update(new GameTime());

            PrivateObject privateManager = new PrivateObject(manager);
            List<LiftObject> liftObjects = (List<LiftObject>)privateManager.GetField("liftObjects");

            Assert.IsTrue(liftObjects[0].Position.Y < 500);
        }