12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- using Microsoft.VisualStudio.TestTools.UnitTesting;
- using System;
- using WSUniversalLib;
- namespace UnitTest
- {
- [TestClass]
- public class EasyTest
- {
- [TestMethod]
- public void GetPriorityForAgent_UsusalValue()
- {
- int actual, expented;
- actual = Calculation.GetPriorityForAgent(2, 23, 1.5f);
- expented = 5;
- Assert.AreEqual(expented, actual);
- }
- [TestMethod]
- public void GetPriorityForAgent_NegatineValueAge()
- {
- int actual, expented;
- actual = Calculation.GetPriorityForAgent(2, -23, 1.5f);
- expented = -1;
- Assert.AreEqual(expented, actual);
- }
- [TestMethod]
- public void GetPriorityForAgent_NegatineValueExp()
- {
- int actual, expented;
- actual = Calculation.GetPriorityForAgent(2, 23, -1.5f);
- expented = -1;
- Assert.AreEqual(expented, actual);
- }
- [TestMethod]
- public void GetPriorityForAgent_NegatineValueType()
- {
- int actual, expented;
- actual = Calculation.GetPriorityForAgent(-2, 23, 1.5f);
- expented = -1;
- Assert.AreEqual(expented, actual);
- }
- [TestMethod]
- public void GetPriorityForAgent_FloatValueAge()
- {
- int actual, expented;
- actual = Calculation.GetPriorityForAgent(2, 20.2f, 1);
- expented = 3;
- Assert.AreEqual(expented, actual);
- }
- [TestMethod]
- public void GetPriorityForAgent_BigAge()
- {
- int actual, expented;
- actual = Calculation.GetPriorityForAgent(2, 45, 1);
- expented = 4;
- Assert.AreEqual(expented, actual);
- }
- [TestMethod]
- public void GetPriorityForAgent_BigExp()
- {
- int actual, expented;
- actual = Calculation.GetPriorityForAgent(2, 30, 10);
- expented = 41;
- Assert.AreEqual(expented, actual);
- }
- [TestMethod]
- public void GetPriorityForAgent_ZeroExp()
- {
- int actual, expented;
- actual = Calculation.GetPriorityForAgent(2, 30, 0);
- expented = -1;
- Assert.AreEqual(expented, actual);
- }
- }
- }
|