Add material arbitrage tests (#13315)
This commit is contained in:
@@ -31,15 +31,19 @@ public sealed class CargoTest
|
||||
{
|
||||
var mapId = testMap.MapId;
|
||||
|
||||
foreach (var proto in protoManager.EnumeratePrototypes<CargoProductPrototype>())
|
||||
Assert.Multiple(() =>
|
||||
{
|
||||
var ent = entManager.SpawnEntity(proto.Product, new MapCoordinates(Vector2.Zero, mapId));
|
||||
var price = pricing.GetPrice(ent);
|
||||
foreach (var proto in protoManager.EnumeratePrototypes<CargoProductPrototype>())
|
||||
{
|
||||
var ent = entManager.SpawnEntity(proto.Product, new MapCoordinates(Vector2.Zero, mapId));
|
||||
var price = pricing.GetPrice(ent);
|
||||
|
||||
Assert.That(price, Is.LessThan(proto.PointCost), $"Found arbitrage on {proto.ID} cargo product! Cost is {proto.PointCost} but sell is {price}!");
|
||||
entManager.DeleteEntity(ent);
|
||||
}
|
||||
Assert.That(price, Is.LessThan(proto.PointCost), $"Found arbitrage on {proto.ID} cargo product! Cost is {proto.PointCost} but sell is {price}!");
|
||||
entManager.DeleteEntity(ent);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
mapManager.DeleteMap(mapId);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user