Merge branch 'develop' of https://github.com/sp-tarkov/server-csharp into develop
# Conflicts: # UnitTests/Tests/Helpers/BotGeneratorHelperTests.cs
This commit is contained in:
+3
-1
@@ -15,6 +15,7 @@ public class DI
|
||||
private static IServiceProvider _serviceProvider;
|
||||
|
||||
private static DI? _instance;
|
||||
|
||||
private DI()
|
||||
{
|
||||
ConfigureServices();
|
||||
@@ -59,7 +60,8 @@ public class DI
|
||||
}
|
||||
}
|
||||
|
||||
public T GetService<T>() where T : notnull
|
||||
public T GetService<T>()
|
||||
where T : notnull
|
||||
{
|
||||
return _serviceProvider.GetRequiredService<T>();
|
||||
}
|
||||
|
||||
@@ -139,8 +139,8 @@ public class BotGeneratorHelperTests
|
||||
Assert.AreEqual(ItemAddedResult.SUCCESS, result);
|
||||
|
||||
var weaponRoot = weaponWithChildren.FirstOrDefault(item => item.Id == rootWeaponId);
|
||||
Assert.AreEqual((weaponRoot.Location as ItemLocation).X, 0);
|
||||
Assert.AreEqual((weaponRoot.Location as ItemLocation).Y, 0);
|
||||
Assert.AreNotEqual((weaponRoot.Location as ItemLocation).X, 0);
|
||||
Assert.AreNotEqual((weaponRoot.Location as ItemLocation).Y, 0);
|
||||
Assert.AreEqual((weaponRoot.Location as ItemLocation).R, ItemRotation.Horizontal);
|
||||
foreach (var item in botInventory.Items.Where(i => tplsToAdd.ContainsKey(i.Template)))
|
||||
{
|
||||
|
||||
@@ -173,13 +173,7 @@ public class InventoryHelperTests
|
||||
Template = "6699249f3c4fda6471005cba",
|
||||
ParentId = root.Id,
|
||||
SlotId = "mod_stock",
|
||||
Upd = new Upd
|
||||
{
|
||||
Foldable = new UpdFoldable
|
||||
{
|
||||
Folded = true
|
||||
}
|
||||
},
|
||||
Upd = new Upd { Foldable = new UpdFoldable { Folded = true } },
|
||||
};
|
||||
weaponWithChildren.Add(stock);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user