@ -283,5 +283,89 @@ namespace MonsterTests
Assert : : AreEqual ( 1 , testMonster . GetHealth ( ) ) ;
Assert : : IsTrue ( testMonster . IsAlive ( ) ) ;
}
TEST_METHOD ( IllegalDefenseStatUpBuffCheck ) {
try {
Monster testMonster { { } , MONSTER_DATA [ " TestName " ] } ;
testMonster . AddBuff ( BuffType : : STAT_UP , 5.f , 5.f , { " Defense " } ) ;
Assert : : Fail ( L " Adding a Defense buff succeeded! This should NOT be allowed! " ) ;
} catch ( std : : exception & e ) { }
}
TEST_METHOD ( IllegalMoveSpdStatUpBuffCheck ) {
try {
Monster testMonster { { } , MONSTER_DATA [ " TestName " ] } ;
testMonster . AddBuff ( BuffType : : STAT_UP , 5.f , 5.f , { " Move Spd % " } ) ;
Assert : : Fail ( L " Adding a Move Spd % buff succeeded! This should NOT be allowed! " ) ;
} catch ( std : : exception & e ) { }
}
TEST_METHOD ( IllegalDefensePctStatUpBuffCheck ) {
try {
Monster testMonster { { } , MONSTER_DATA [ " TestName " ] } ;
testMonster . AddBuff ( BuffType : : STAT_UP , 5.f , 5.f , { " Defense % " } ) ;
Assert : : Fail ( L " Adding a Defense % buff succeeded! This should NOT be allowed! " ) ;
} catch ( std : : exception & e ) { }
}
TEST_METHOD ( IllegalCDRStatUpBuffCheck ) {
try {
Monster testMonster { { } , MONSTER_DATA [ " TestName " ] } ;
testMonster . AddBuff ( BuffType : : STAT_UP , 5.f , 5.f , { " CDR " } ) ;
Assert : : Fail ( L " Adding a CDR buff succeeded! This should NOT be allowed! " ) ;
} catch ( std : : exception & e ) { }
}
TEST_METHOD ( IllegalCritRateStatUpBuffCheck ) {
try {
Monster testMonster { { } , MONSTER_DATA [ " TestName " ] } ;
testMonster . AddBuff ( BuffType : : STAT_UP , 5.f , 5.f , { " Crit Rate " } ) ;
Assert : : Fail ( L " Adding a Crit Rate buff succeeded! This should NOT be allowed! " ) ;
} catch ( std : : exception & e ) { }
}
TEST_METHOD ( IllegalCritDmgStatUpBuffCheck ) {
try {
Monster testMonster { { } , MONSTER_DATA [ " TestName " ] } ;
testMonster . AddBuff ( BuffType : : STAT_UP , 5.f , 5.f , { " Crit Damage " } ) ;
Assert : : Fail ( L " Adding a Crit Damage buff succeeded! This should NOT be allowed! " ) ;
} catch ( std : : exception & e ) { }
}
TEST_METHOD ( IllegalHPRecoveryPctStatUpBuffCheck ) {
try {
Monster testMonster { { } , MONSTER_DATA [ " TestName " ] } ;
testMonster . AddBuff ( BuffType : : STAT_UP , 5.f , 5.f , { " HP Recovery % " } ) ;
Assert : : Fail ( L " Adding a HP Recovery % buff succeeded! This should NOT be allowed! " ) ;
} catch ( std : : exception & e ) { }
}
TEST_METHOD ( IllegalHP6RecoveryPctStatUpBuffCheck ) {
try {
Monster testMonster { { } , MONSTER_DATA [ " TestName " ] } ;
testMonster . AddBuff ( BuffType : : STAT_UP , 5.f , 5.f , { " HP6 Recovery % " } ) ;
Assert : : Fail ( L " Adding a HP6 Recovery % buff succeeded! This should NOT be allowed! " ) ;
} catch ( std : : exception & e ) { }
}
TEST_METHOD ( IllegalHP4RecoveryPctStatUpBuffCheck ) {
try {
Monster testMonster { { } , MONSTER_DATA [ " TestName " ] } ;
testMonster . AddBuff ( BuffType : : STAT_UP , 5.f , 5.f , { " HP4 Recovery % " } ) ;
Assert : : Fail ( L " Adding a HP4 Recovery % buff succeeded! This should NOT be allowed! " ) ;
} catch ( std : : exception & e ) { }
}
TEST_METHOD ( IllegalDamageReductionStatUpBuffCheck ) {
try {
Monster testMonster { { } , MONSTER_DATA [ " TestName " ] } ;
testMonster . AddBuff ( BuffType : : STAT_UP , 5.f , 5.f , { " Damage Reduction " } ) ;
Assert : : Fail ( L " Adding a Damage Reduction buff succeeded! This should NOT be allowed! " ) ;
} catch ( std : : exception & e ) { }
}
TEST_METHOD ( IllegalAttackSpdStatUpBuffCheck ) {
try {
Monster testMonster { { } , MONSTER_DATA [ " TestName " ] } ;
testMonster . AddBuff ( BuffType : : STAT_UP , 5.f , 5.f , { " Attack Spd " } ) ;
Assert : : Fail ( L " Adding a Attack Spd buff succeeded! This should NOT be allowed! " ) ;
} catch ( std : : exception & e ) { } ;
}
TEST_METHOD ( IllegalManaStatUpBuffCheck ) {
try {
Monster testMonster { { } , MONSTER_DATA [ " TestName " ] } ;
testMonster . AddBuff ( BuffType : : STAT_UP , 5.f , 5.f , { " Mana " } ) ;
Assert : : Fail ( L " Adding a Mana buff succeeded! This should NOT be allowed! " ) ;
} catch ( std : : exception & e ) { }
}
} ;
}