public async void Should_InitializeAsync() { var indoorManager = new IndoorManager(_jsRuntime.Object, _logger.Object); await indoorManager.InitializeAsync(); _jsRuntime.Verify(runtime => runtime.InvokeVoidAsync(Constants.JsConstants.Methods.Indoor.Initialize.ToIndoorNamespace(), indoorManager.Id), Times.Once); _jsRuntime.VerifyNoOtherCalls(); }
public async void Should_NotInitialize_DisposedCase_Async() { var indoorManager = new IndoorManager(_jsRuntime.Object, _logger.Object); await indoorManager.DisposeAsync(); await Assert.ThrowsAnyAsync <ComponentDisposedException>(async() => await indoorManager.InitializeAsync()); _jsRuntime.Verify(runtime => runtime.InvokeVoidAsync(Constants.JsConstants.Methods.Indoor.Dispose.ToIndoorNamespace(), indoorManager.Id), Times.Once); _jsRuntime.VerifyNoOtherCalls(); }