ProductLinesCommandTests: the bins of a removed line go with it, as the catalog read now requires
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
8d65e957f8
commit
e6a17a5e01
1 changed files with 3 additions and 1 deletions
|
|
@ -42,7 +42,9 @@ public abstract class ProductLinesCommandTests : IDisposable
|
|||
Assert.Equal(Names.Length, products.Length);
|
||||
_shipped = products.Select(p => Describe(cache, p)).OrderBy(x => x, StringComparer.Ordinal).ToArray();
|
||||
_shippedKeys = products.Select(p => cache.RefOf(p).Key.Value).OrderBy(x => x, StringComparer.Ordinal).ToArray();
|
||||
foreach (var product in products) Assert.True(cache.Remove(cache.RefOf(product).Key));
|
||||
// A bin cannot outlive its line (the catalog read refuses it), so the bins of the removed lines go with them.
|
||||
var binned = cache.GetAll<FactionProductData>().Where(p => p.Bin != null && products.Any(line => cache.RefOf(line).Key.Equals(p.Bin.Line.Key))).ToArray();
|
||||
foreach (var product in products.Concat(binned)) Assert.True(cache.Remove(cache.RefOf(product).Key));
|
||||
cache.FlushAsync().Wait();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue