Add do_after to TryInsert (#1938)
Add delay to flushing Co-authored-by: Julian Giebel <j.giebel@netrocks.info>
This commit is contained in:
@@ -22,14 +22,17 @@ namespace Content.IntegrationTests.Tests.Disposal
|
||||
{
|
||||
foreach (var entity in entities)
|
||||
{
|
||||
var insertTask = unit.TryInsert(entity);
|
||||
Assert.That(unit.CanInsert(entity), Is.EqualTo(result));
|
||||
Assert.That(unit.TryInsert(entity), Is.EqualTo(result));
|
||||
|
||||
if (result)
|
||||
insertTask.ContinueWith(task =>
|
||||
{
|
||||
// Not in a tube yet
|
||||
Assert.That(entity.Transform.Parent == unit.Owner.Transform);
|
||||
}
|
||||
Assert.That(task.Result, Is.EqualTo(result));
|
||||
if (result)
|
||||
{
|
||||
// Not in a tube yet
|
||||
Assert.That(entity.Transform.Parent, Is.EqualTo(unit.Owner.Transform));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user