12345678910111213141516171819202122232425262728293031323334353637 |
- using Microsoft.VisualStudio.TestTools.UnitTesting;
- using System;
- using WSUniversalLib;
- namespace Session2ModuleTest
- {
- [TestClass]
- public class UnitTest1
- {
- Calculation calc = new Calculation();
- [TestMethod]
- 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));
- }
- }
- }
|