.NET Format Style Fixes

This commit is contained in:
sp-tarkov-bot
2025-07-22 18:42:12 +00:00
parent 5bbf671acd
commit 22da08bca5
4 changed files with 19 additions and 11 deletions
@@ -33,9 +33,8 @@
<!-- BuildType options - LOCAL, DEBUG, RELEASE, BLEEDING_EDGE, BLEEDING_EDGE_MODS - *must be all caps*--> <!-- BuildType options - LOCAL, DEBUG, RELEASE, BLEEDING_EDGE, BLEEDING_EDGE_MODS - *must be all caps*-->
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<InternalsVisibleTo Include="UnitTests"/> <InternalsVisibleTo Include="UnitTests" />
</ItemGroup> </ItemGroup>
<Target Name="AfterEverythingDone" AfterTargets="PostBuildEvent"> <Target Name="AfterEverythingDone" AfterTargets="PostBuildEvent">
<Exec <Exec
ConsoleToMsBuild="true" ConsoleToMsBuild="true"
+3 -1
View File
@@ -15,6 +15,7 @@ public class DI
private static IServiceProvider _serviceProvider; private static IServiceProvider _serviceProvider;
private static DI? _instance; private static DI? _instance;
private DI() private DI()
{ {
ConfigureServices(); 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>(); return _serviceProvider.GetRequiredService<T>();
} }
@@ -127,7 +127,20 @@ public class BotGeneratorHelperTests
botInventory botInventory
); );
_botLootGenerator.AddLootFromPool(new Dictionary<MongoId, double>{{ItemTpl.BARTER_MALBORO_CIGARETTES, 1}, {ItemTpl.FOREGRIP_SAKO_TRG_M10_GRIP_PAD, 1}, {ItemTpl.BARTER_GOLD_SKULL_RING, 1}, {ItemTpl.BARTER_PACK_OF_NAILS, 1}}, [EquipmentSlots.Backpack], 4, botInventory, "assault", null); _botLootGenerator.AddLootFromPool(
new Dictionary<MongoId, double>
{
{ ItemTpl.BARTER_MALBORO_CIGARETTES, 1 },
{ ItemTpl.FOREGRIP_SAKO_TRG_M10_GRIP_PAD, 1 },
{ ItemTpl.BARTER_GOLD_SKULL_RING, 1 },
{ ItemTpl.BARTER_PACK_OF_NAILS, 1 },
},
[EquipmentSlots.Backpack],
4,
botInventory,
"assault",
null
);
Assert.AreEqual(ItemAddedResult.SUCCESS, result); Assert.AreEqual(ItemAddedResult.SUCCESS, result);
@@ -173,13 +173,7 @@ public class InventoryHelperTests
Template = "6699249f3c4fda6471005cba", Template = "6699249f3c4fda6471005cba",
ParentId = root.Id, ParentId = root.Id,
SlotId = "mod_stock", SlotId = "mod_stock",
Upd = new Upd Upd = new Upd { Foldable = new UpdFoldable { Folded = true } },
{
Foldable = new UpdFoldable
{
Folded = true
}
},
}; };
weaponWithChildren.Add(stock); weaponWithChildren.Add(stock);