public async Task ReactInstanceManager_ArgumentChecks() { ReactInstanceManager manager = null; await DispatcherHelpers.CallOnDispatcherAsync(() => manager = CreateReactInstanceManager()); await AssertEx.ThrowsAsync <ArgumentNullException>( async() => await DispatcherHelpers.CallOnDispatcherAsync(() => manager.AttachMeasuredRootViewAsync(null)), ex => Assert.AreEqual("rootView", ex.ParamName)); await AssertEx.ThrowsAsync <ArgumentNullException>( async() => await DispatcherHelpers.CallOnDispatcherAsync(() => manager.CreateAllViewManagers(null)), ex => Assert.AreEqual("reactContext", ex.ParamName)); await AssertEx.ThrowsAsync <ArgumentNullException>( async() => await DispatcherHelpers.CallOnDispatcherAsync(() => manager.DetachRootViewAsync(null)), ex => Assert.AreEqual("rootView", ex.ParamName)); await DispatcherHelpers.CallOnDispatcherAsync(async() => await DisposeInstanceManager(manager)); }