예제 #1
0
        public async void Should_SetDynamicStylingAsync()
        {
            var indoorManager = new IndoorManager(_jsRuntime.Object, _logger.Object);
            await indoorManager.SetDynamicStylingAsync(true);

            _jsRuntime.Verify(runtime => runtime.InvokeVoidAsync(Constants.JsConstants.Methods.Indoor.SetDynamicStyling.ToIndoorNamespace(), indoorManager.Id, true), Times.Once);
            _jsRuntime.VerifyNoOtherCalls();
        }
예제 #2
0
        public async void Should_NotSetDynamicStyling_DisposedCase_Async()
        {
            var indoorManager = new IndoorManager(_jsRuntime.Object, _logger.Object);
            await indoorManager.DisposeAsync();

            await Assert.ThrowsAnyAsync <ComponentDisposedException>(async() => await indoorManager.SetDynamicStylingAsync(true));

            _jsRuntime.Verify(runtime => runtime.InvokeVoidAsync(Constants.JsConstants.Methods.Indoor.Dispose.ToIndoorNamespace(), indoorManager.Id), Times.Once);
            _jsRuntime.VerifyNoOtherCalls();
        }