Add interaction tests (#15251)

This commit is contained in:
Leon Friedrich
2023-04-15 07:41:25 +12:00
committed by GitHub
parent ffe946729f
commit 489660a6bb
36 changed files with 2354 additions and 32 deletions

View File

@@ -92,6 +92,7 @@ namespace Content.IntegrationTests.Tests.Interaction.Click
Assert.That(interactUsing);
});
testInteractionSystem.ClearHandlers();
await pairTracker.CleanReturnAsync();
}
@@ -154,6 +155,7 @@ namespace Content.IntegrationTests.Tests.Interaction.Click
Assert.That(interactUsing, Is.False);
});
testInteractionSystem.ClearHandlers();
await pairTracker.CleanReturnAsync();
}
@@ -214,6 +216,7 @@ namespace Content.IntegrationTests.Tests.Interaction.Click
Assert.That(interactUsing);
});
testInteractionSystem.ClearHandlers();
await pairTracker.CleanReturnAsync();
}
@@ -275,6 +278,7 @@ namespace Content.IntegrationTests.Tests.Interaction.Click
Assert.That(interactUsing, Is.False);
});
testInteractionSystem.ClearHandlers();
await pairTracker.CleanReturnAsync();
}
@@ -352,6 +356,7 @@ namespace Content.IntegrationTests.Tests.Interaction.Click
Assert.That(interactUsing, Is.True);
});
testInteractionSystem.ClearHandlers();
await pairTracker.CleanReturnAsync();
}
@@ -367,6 +372,12 @@ namespace Content.IntegrationTests.Tests.Interaction.Click
SubscribeLocalEvent<InteractUsingEvent>((e) => InteractUsingEvent?.Invoke(e));
SubscribeLocalEvent<InteractHandEvent>((e) => InteractHandEvent?.Invoke(e));
}
public void ClearHandlers()
{
InteractUsingEvent = null;
InteractHandEvent = null;
}
}
}