|
@@ -7,9 +7,31 @@ namespace Session2ModuleTest
|
|
|
[TestClass]
|
|
|
public class UnitTest1
|
|
|
{
|
|
|
+ Calculation calc = new Calculation();
|
|
|
[TestMethod]
|
|
|
- public void TestMethod1()
|
|
|
+ public void GetPriorityForAgent_NonExistentAgentType()
|
|
|
{
|
|
|
+ Assert.AreEqual(-1, calc.GetPriorityForAgent(0, 25, 2));
|
|
|
+ }
|
|
|
+ [TestMethod]
|
|
|
+ public void GetPriorityForAgent_ImpossibleAgentAge()
|
|
|
+ {
|
|
|
+ Assert.AreEqual(-1, calc.GetPriorityForAgent(2, -1, 2));
|
|
|
+ }
|
|
|
+ [TestMethod]
|
|
|
+ public void GetPriorityForAgent_ImpossibleAgentExperience()
|
|
|
+ {
|
|
|
+ Assert.AreEqual(-1, calc.GetPriorityForAgent(2, 25, -1));
|
|
|
+ }
|
|
|
+ [TestMethod]
|
|
|
+ public void GetPriorityForAgent_ExperienceBiggerThanAge()
|
|
|
+ {
|
|
|
+ Assert.AreEqual(-1, calc.GetPriorityForAgent(2, 24, 25));
|
|
|
+ }
|
|
|
+ [TestMethod]
|
|
|
+ public void GetPriorityForAgent_EasyCalculation()
|
|
|
+ {
|
|
|
+ Assert.AreEqual(5, calc.GetPriorityForAgent(2, 23, 1.5f));
|
|
|
}
|
|
|
}
|
|
|
}
|