Quellcode durchsuchen

Небольшие поправки в методе

Barsik Kato vor 2 Jahren
Ursprung
Commit
a50dbaa79a
3 geänderte Dateien mit 7 neuen und 6 gelöschten Zeilen
  1. 2 2
      Session2ModuleTest/UnitTest1.cs
  2. 5 4
      WSUniversalLib/Class1.cs
  3. BIN
      WSUniversalLib/WSUniversalLib.dll

+ 2 - 2
Session2ModuleTest/UnitTest1.cs

@@ -60,7 +60,7 @@ namespace Session2ModuleTest
         [TestMethod]
         public void GetPriorityForAgent_HardCalculation_01()
         {
-            Assert.AreEqual(94, calc.GetPriorityForAgent(3, 41.11f, 20.45f));
+            Assert.AreEqual(98, calc.GetPriorityForAgent(3, 41.11f, 20.45f));
         }
         [TestMethod]
         public void GetPriorityForAgent_HardCalculation_02()
@@ -80,7 +80,7 @@ namespace Session2ModuleTest
         [TestMethod]
         public void GetPriorityForAgent_HardCalculation_05()
         {
-            Assert.AreEqual(150, calc.GetPriorityForAgent(2, 67.68f, 40.78f));
+            Assert.AreEqual(167, calc.GetPriorityForAgent(2, 67.68f, 40.78f));
         }
         #endregion
     }

+ 5 - 4
WSUniversalLib/Class1.cs

@@ -27,17 +27,18 @@ namespace WSUniversalLib
                 default:
                     return -1;
             }
-            if(experience > 10)
+            if(experience > 40)
             {
-                x += 0.5f;
+                x += 0.9f;
+                
             }
             else if (experience > 20)
             {
                 x += 0.7f;
             }
-            else if (experience > 40)
+            else if (experience > 10)
             {
-                x += 0.9f;
+                x += 0.5f;
             }
             if (age <= 25 && experience <= 3)
             {

BIN
WSUniversalLib/WSUniversalLib.dll