Runtime/UnityEventListener.cs
/// <summary>
/// Asserts that exactly the amount of provided invocations with the provided payload took place.
/// </summary>
/// <param name="payload">Payload</param>
/// <param name="expectedInvocations">Amount of invocations</param>
Asserts that exactly the amount of provided invocations with the provided payload took place.
Asserts that exactly the amount of provided invocations with the provided payload took place .
public void AssertInvocationsWithPayload<T>(T payload, int expectedInvocations)
        {
            var actualInvocations = GetInvocationsForPayload(payload);
            Assert.AreEqual(expectedInvocations, actualInvocations, $"Event {_name} for {payload} should have been invoked {expectedInvocations} times but was {actualInvocations}");
        }
public void AssertInvocationsWithPayload < T > ( T payload , int expectedInvocations ) { var actualInvocations = GetInvocationsForPayload ( payload ) ; Assert . AreEqual ( expectedInvocations , actualInvocations , $" Event  { _name }  for  { payload }  should have been invoked  { expectedInvocations }  times but was  { actualInvocations } " ) ; }
Asserts that exactly the amount of provided invocations with the provided payload took place.
Asserts that exactly the amount of provided invocations with the provided payload took place .
payload
T
None
expectedInvocations
int
Amount of invocations
Amount of invocations