public void TestNewPowerUpAddSpeedBoost()
    {
        int expected = 1;
        //Arrange
        GameObject testObject = new GameObject();

        testObject.AddComponent <PowerUp>();
        PowerUp powerup = testObject.GetComponent <PowerUp>();

        powerup.powerup = new int[4];
        powerup.AddPowerUp(1);
        Assert.AreEqual(expected, powerup.powerup[1], "Testing if we have an speedboost powerup.");
    }
    public void TestNewPowerUpAddNuke()
    {
        int expected = 1;
        //Arrange
        GameObject testObject = new GameObject();

        testObject.AddComponent <PowerUp>();
        PowerUp powerup = testObject.GetComponent <PowerUp>();

        powerup.powerup = new int[4];
        powerup.AddPowerUp(3);
        Assert.AreEqual(expected, powerup.powerup[3], "Testing if we have an nuke powerup.");
    }
    public void TestgetPowerUpAmmount()
    {
        int expected = 1;
        //Arrange
        GameObject testObject = new GameObject();

        testObject.AddComponent <PowerUp>();
        PowerUp powerup = testObject.GetComponent <PowerUp>();

        powerup.powerup = new int[4];
        powerup.AddPowerUp(0);
        Assert.AreEqual(expected, powerup.getPowerUpAmmount(0), "Testing if getpowerupammount returns the correct value.");
    }
    public void TestHavePowerUp()
    {
        bool expected = true;
        //Arrange
        GameObject testObject = new GameObject();

        testObject.AddComponent <PowerUp>();
        PowerUp powerup = testObject.GetComponent <PowerUp>();

        powerup.powerup = new int[4];
        powerup.AddPowerUp(0);
        Assert.AreEqual(expected, powerup.HavePowerup(0), "Testing if we have a powerup.");
    }
    public void TestUsePowerUpSpeedBoostWhenWeAreAlreadyUsingSPeedBoost()
    {
        int expected = 1;
        //Arrange
        GameObject testObject = new GameObject();

        testObject.AddComponent <PowerUp>();
        testObject.AddComponent <playerController>();
        playerController playerc = testObject.GetComponent <playerController>();

        playerc.player    = new GameObject();
        playerc.health    = 100;
        playerc.moveSpeed = 10;
        PowerUp powerup = testObject.GetComponent <PowerUp>();

        powerup.player  = playerc;
        powerup.powerup = new int[4];
        powerup.AddPowerUp(1);
        powerup.AddPowerUp(1);
        powerup.UsePowerup(1);
        powerup.UsePowerup(1);
        Assert.AreEqual(expected, powerup.powerup[1], "Testing if we cannot use a seocnd speedboost while already using one.");
    }
    public void TestUsePowerUpArmorWhenPlayerHealthOverOneHundred()
    {
        int expected = 1;
        //Arrange
        GameObject testObject = new GameObject();

        testObject.AddComponent <PowerUp>();
        testObject.AddComponent <playerController>();
        playerController playerc = testObject.GetComponent <playerController>();

        playerc.player = new GameObject();
        playerc.health = 200;
        PowerUp powerup = testObject.GetComponent <PowerUp>();

        powerup.player  = playerc;
        powerup.powerup = new int[4];
        powerup.AddPowerUp(0);
        powerup.UsePowerup(0);
        Assert.AreEqual(expected, powerup.powerup[0], "Testing if we used the armor powerup.");
    }
 //adds a powerup based on the given i
 public void NewPowerup(int i)
 {
     powerup.AddPowerUp(i);
 }