public async Task Test104() { var identifier = "test"; var handler = new MockJsRuntimeInvokeHandler(); await handler.ToJsRuntime().InvokeVoidAsync(identifier); var invocations = handler.VerifyInvoke(identifier, 1); invocations.ShouldBeSameAs(handler.Invocations[identifier]); var invocation = handler.VerifyInvoke(identifier); invocation.ShouldBe(handler.Invocations[identifier][0]); }
public async Task Test103() { var identifier = "test"; var handler = new MockJsRuntimeInvokeHandler(); await handler.ToJsRuntime().InvokeVoidAsync(identifier); var actual = Should.Throw <JsInvokeCountExpectedException>(() => handler.VerifyInvoke(identifier, 2)); actual.ExpectedInvocationCount.ShouldBe(2); actual.ActualInvocationCount.ShouldBe(1); actual.Identifier.ShouldBe(identifier); }
public void Test101() { var handler = new MockJsRuntimeInvokeHandler(); Should.Throw <ArgumentException>(() => handler.VerifyInvoke("", 0)); }