public async void Should_SetFacilityAsync() { var indoorManager = new IndoorManager(_jsRuntime.Object, _logger.Object); await indoorManager.SetFacilityAsync("facilityId", 1); _jsRuntime.Verify(runtime => runtime.InvokeVoidAsync(Constants.JsConstants.Methods.Indoor.SetFacility.ToIndoorNamespace(), indoorManager.Id, "facilityId", 1), Times.Once); _jsRuntime.VerifyNoOtherCalls(); }
public async void Should_NotSetFacility_DisposedCase_Async() { var indoorManager = new IndoorManager(_jsRuntime.Object, _logger.Object); await indoorManager.DisposeAsync(); await Assert.ThrowsAnyAsync <ComponentDisposedException>(async() => await indoorManager.SetFacilityAsync("facilityId", 1)); _jsRuntime.Verify(runtime => runtime.InvokeVoidAsync(Constants.JsConstants.Methods.Indoor.Dispose.ToIndoorNamespace(), indoorManager.Id), Times.Once); _jsRuntime.VerifyNoOtherCalls(); }