@@ -0,0 +1,2082 @@
+package org.apollo.game.model.entity;%0A%0Aimport org.junit.Test;%0A%0Aimport static org.junit.Assert.*;%0A%0A/**%0A * Tests the %7B@link SkillSet%7D class.%0A *%0A * @author munggs%0A */%0Apublic final class SkillSetTests %7B%0A%0A%09/**%0A%09 * Tests %7B@link SkillSet#addExperience(int, double)%7D.%0A%09 */%0A%09@Test%0A%09public void addExperience() %7B%0A%09%09SkillSet skillSet = new SkillSet();%0A%09%09assertEquals(skillSet.getSkill(Skill.ATTACK).getCurrentLevel(), 1);%0A%09%09assertEquals(skillSet.getSkill(Skill.ATTACK).getExperience(), 0, 0);%0A%0A%09%09skillSet.addExperience(Skill.ATTACK, 5);%0A%09%09assertEquals(skillSet.getSkill(Skill.ATTACK).getCurrentLevel(), 1);%0A%09%09assertEquals(skillSet.getSkill(Skill.ATTACK).getExperience(), 5, 0);%0A%0A%09%09skillSet.addExperience(Skill.ATTACK, 150);%0A%09%09assertEquals(skillSet.getSkill(Skill.ATTACK).getCurrentLevel(), 2);%0A%09%09assertEquals(skillSet.getSkill(Skill.ATTACK).getExperience(), 155, 0);%0A%0A%09%09skillSet.addExperience(Skill.ATTACK, 200000000);%0A%09%09assertEquals(skillSet.getSkill(Skill.ATTACK).getCurrentLevel(), 99);%0A%09%09assertEquals(skillSet.getSkill(Skill.ATTACK).getExperience(), 200000000, 0);%0A%09%7D%0A%0A%09/**%0A%09 * Tests %7B@link SkillSet#calculateCombatLevel()%7D.%0A%09 */%0A%09@Test%0A%09public void calculateCombatLevel() %7B%0A%09%09SkillSet skillSet = new SkillSet();%0A%09%09assertEquals(skillSet.getCombatLevel(), 3);%0A%0A%09%09skillSet.addExperience(Skill.ATTACK, 200);%0A%09%09skillSet.calculateCombatLevel();%0A%09%09assertEquals(skillSet.getCombatLevel(), 4);%0A%0A%09%09skillSet.setMaximumLevel(Skill.MAGIC, 10);%0A%09%09skillSet.calculateCombatLevel();%0A%09%09assertEquals(skillSet.getCombatLevel(), 9);%0A%09%7D%0A%0A%09/**%0A%09 * Tests %7B@link SkillSet#normalize()%7D.%0A%09 */%0A%09@Test%0A%09public void normalize() %7B%0A%09%09SkillSet skillSet = new SkillSet();%0A%09%09assertEquals(skillSet.getSkill(Skill.ATTACK).getCurrentLevel(), 1);%0A%09%09skillSet.setMaximumLevel(Skill.ATTACK, 2);%0A%0A%09%09skillSet.normalize();%0A%09%09assertEquals(skillSet.getSkill(Skill.ATTACK).getCurrentLevel(), 2);%0A%0A%09%09skillSet.normalize();%0A%09%09assertEquals(skillSet.getSkill(Skill.ATTACK).getCurrentLevel(), 2);%0A%0A%09%09skillSet.setCurrentLevel(Skill.ATTACK, 3);%0A%09%09skillSet.normalize();%0A%09%09assertEquals(skillSet.getSkill(Skill.ATTACK).getCurrentLevel(), 2);%0A%09%7D%0A%0A%7D

Add unit tests for SkillSet