|
|
|
@ -568,5 +568,16 @@ namespace PlayerTests |
|
|
|
|
game->OnUserUpdate(0.5f); //Wait 0.5 more seconds. The player should be healed now.
|
|
|
|
|
Assert::AreEqual(player->GetMaxHealth(),player->GetHealth(),L"After waiting for 1 second, the player should be at full health."); |
|
|
|
|
} |
|
|
|
|
TEST_METHOD(AdrenalineRushSkillBuffTest){ |
|
|
|
|
testGame->ChangePlayerClass(THIEF); |
|
|
|
|
player=testGame->GetPlayer(); //The player pointer has been reassigned...
|
|
|
|
|
Assert::AreEqual(1.f,player->GetMoveSpdMult(),L"Move Speed Multiplier is set to x1.0 by default."); |
|
|
|
|
Assert::AreEqual(0.f,player->GetAttackRecoveryRateReduction(),L"Attack rate cooldown starts with being reduced by 0 seconds."); |
|
|
|
|
testKey->bHeld=true; //Force the key to be held down for testing purposes.
|
|
|
|
|
player->CheckAndPerformAbility(player->GetAbility3(),testKeyboardInput); |
|
|
|
|
Assert::IsTrue(player->GetBuffs(BuffType::ADRENALINE_RUSH).size()>0,L"After using Adrenaline Rush, player has the Adrenaline Rush buff."); |
|
|
|
|
Assert::AreEqual(1.1f,player->GetMoveSpdMult(),L"Move Speed Multiplier increased by 10% to x1.1"); |
|
|
|
|
Assert::AreEqual(0.105f,player->GetAttackRecoveryRateReduction(),L"Attack Recovery Rate reduced by 30%, or 0.105s"); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|