Added GetArrayValueTest

This commit is contained in:
Chomp
2025-01-29 13:46:06 +00:00
parent ad1d368d08
commit 06b3b7d7fc
3 changed files with 30 additions and 1 deletions
+10
View File
@@ -0,0 +1,10 @@
namespace Core.Models.Enums
{
public enum LootRarity
{
Not_exist = -1,
Common,
Rare,
Superrare
}
}
+10
View File
@@ -0,0 +1,10 @@
namespace Core.Models.Enums
{
public enum ReloadMode
{
ExternalMagazine,
InternalMagazine,
OnlyBarrel,
ExternalMagazineWithInternalReloadSupport
}
}
+10 -1
View File
@@ -1,5 +1,6 @@
using Core.Utils;
using Core.Utils;
using Core.Utils.Cloners;
using Newtonsoft.Json.Linq;
using UnitTests.Mock;
namespace UnitTests.Tests.Utils;
@@ -193,4 +194,12 @@ public sealed class RandomUtilTests
{
Assert.AreEqual(decimalPoints, _randomUtil.GetNumberPrecision(value));
}
[TestMethod]
[DataRow(new[] { "test" }, "test", "Expected first array value")]
public void GetArrayValueTest(string[] input, string expectedOutput, string failMessage)
{
var result = _randomUtil.GetArrayValue(input);
Assert.AreEqual(input.First(), result, failMessage);
}
}