|
@@ -8,12 +8,18 @@ namespace Session2ModuleTest
|
|
|
public class UnitTest1
|
|
|
{
|
|
|
Calculation calc = new Calculation();
|
|
|
+ #region EasyTests
|
|
|
[TestMethod]
|
|
|
- public void GetPriorityForAgent_NonExistentAgentType()
|
|
|
+ public void GetPriorityForAgent_NonExistentAgentType_01()
|
|
|
{
|
|
|
Assert.AreEqual(-1, calc.GetPriorityForAgent(0, 25, 2));
|
|
|
}
|
|
|
[TestMethod]
|
|
|
+ public void GetPriorityForAgent_NonExistentAgentType_02()
|
|
|
+ {
|
|
|
+ Assert.AreEqual(-1, calc.GetPriorityForAgent(4, 25, 2));
|
|
|
+ }
|
|
|
+ [TestMethod]
|
|
|
public void GetPriorityForAgent_ImpossibleAgentAge()
|
|
|
{
|
|
|
Assert.AreEqual(-1, calc.GetPriorityForAgent(2, -1, 2));
|
|
@@ -29,9 +35,53 @@ namespace Session2ModuleTest
|
|
|
Assert.AreEqual(-1, calc.GetPriorityForAgent(2, 24, 25));
|
|
|
}
|
|
|
[TestMethod]
|
|
|
- public void GetPriorityForAgent_EasyCalculation()
|
|
|
+ public void GetPriorityForAgent_EasyCalculation_01()
|
|
|
{
|
|
|
Assert.AreEqual(5, calc.GetPriorityForAgent(2, 23, 1.5f));
|
|
|
}
|
|
|
+ [TestMethod]
|
|
|
+ public void GetPriorityForAgent_EasyCalculation_02()
|
|
|
+ {
|
|
|
+ Assert.AreEqual(5, calc.GetPriorityForAgent(1, 26, 3));
|
|
|
+ }
|
|
|
+ [TestMethod]
|
|
|
+ public void GetPriorityForAgent_EasyCalculation_03()
|
|
|
+ {
|
|
|
+ Assert.AreEqual(20, calc.GetPriorityForAgent(3, 30, 5f));
|
|
|
+ }
|
|
|
+ [TestMethod]
|
|
|
+ public void GetPriorityForAgent_EasyCalculation_05()
|
|
|
+ {
|
|
|
+ Assert.AreEqual(50, calc.GetPriorityForAgent(3, 35, 11));
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region HardTests
|
|
|
+ [TestMethod]
|
|
|
+ public void GetPriorityForAgent_HardCalculation_01()
|
|
|
+ {
|
|
|
+ Assert.AreEqual(94, calc.GetPriorityForAgent(3, 41.11f, 20.45f));
|
|
|
+ }
|
|
|
+ [TestMethod]
|
|
|
+ public void GetPriorityForAgent_HardCalculation_02()
|
|
|
+ {
|
|
|
+ Assert.AreEqual(53, calc.GetPriorityForAgent(2, 37.05f, 14.5f));
|
|
|
+ }
|
|
|
+ [TestMethod]
|
|
|
+ public void GetPriorityForAgent_HardCalculation_03()
|
|
|
+ {
|
|
|
+ Assert.AreEqual(23, calc.GetPriorityForAgent(1, 31.34f, 10.01f));
|
|
|
+ }
|
|
|
+ [TestMethod]
|
|
|
+ public void GetPriorityForAgent_HardCalculation_04()
|
|
|
+ {
|
|
|
+ Assert.AreEqual(8, calc.GetPriorityForAgent(3, 25.11f, 2.15f));
|
|
|
+ }
|
|
|
+ [TestMethod]
|
|
|
+ public void GetPriorityForAgent_HardCalculation_05()
|
|
|
+ {
|
|
|
+ Assert.AreEqual(150, calc.GetPriorityForAgent(2, 67.68f, 40.78f));
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
}
|
|
|
}
|