Added GetArrayValueTest
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
namespace Core.Models.Enums
|
||||
{
|
||||
public enum LootRarity
|
||||
{
|
||||
Not_exist = -1,
|
||||
Common,
|
||||
Rare,
|
||||
Superrare
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace Core.Models.Enums
|
||||
{
|
||||
public enum ReloadMode
|
||||
{
|
||||
ExternalMagazine,
|
||||
InternalMagazine,
|
||||
OnlyBarrel,
|
||||
ExternalMagazineWithInternalReloadSupport
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user