UnitTest1.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. using Microsoft.VisualStudio.TestTools.UnitTesting;
  2. using System;
  3. using WSUniversalLib;
  4. namespace Session2ModuleTest
  5. {
  6. [TestClass]
  7. public class UnitTest1
  8. {
  9. Calculation calc = new Calculation();
  10. [TestMethod]
  11. public void GetPriorityForAgent_NonExistentAgentType()
  12. {
  13. Assert.AreEqual(-1, calc.GetPriorityForAgent(0, 25, 2));
  14. }
  15. [TestMethod]
  16. public void GetPriorityForAgent_ImpossibleAgentAge()
  17. {
  18. Assert.AreEqual(-1, calc.GetPriorityForAgent(2, -1, 2));
  19. }
  20. [TestMethod]
  21. public void GetPriorityForAgent_ImpossibleAgentExperience()
  22. {
  23. Assert.AreEqual(-1, calc.GetPriorityForAgent(2, 25, -1));
  24. }
  25. [TestMethod]
  26. public void GetPriorityForAgent_ExperienceBiggerThanAge()
  27. {
  28. Assert.AreEqual(-1, calc.GetPriorityForAgent(2, 24, 25));
  29. }
  30. [TestMethod]
  31. public void GetPriorityForAgent_EasyCalculation()
  32. {
  33. Assert.AreEqual(5, calc.GetPriorityForAgent(2, 23, 1.5f));
  34. }
  35. }
  36. }