public void NativeModuleRegistry_Override_Disallowed() { var builder = new NativeModuleRegistry.Builder(new ReactContext()); builder.Add(new OverrideDisallowedModule()); AssertEx.Throws <InvalidOperationException>(() => builder.Add(new OverrideDisallowedModule())); }
public void NativeModuleRegistry_ModuleWithNullName_Throws() { var builder = new NativeModuleRegistry.Builder(); AssertEx.Throws<ArgumentException>( () => builder.Add(new NullNameModule()), ex => Assert.AreEqual("module", ex.ParamName)); }
public void NativeModuleRegistry_ArgumentChecks() { var builder = new NativeModuleRegistry.Builder(); AssertEx.Throws<ArgumentNullException>( () => builder.Add(null), ex => Assert.AreEqual("module", ex.ParamName)); }
public void NativeModuleRegistry_ModuleWithNullName_Throws() { var builder = new NativeModuleRegistry.Builder(new ReactContext()); AssertEx.Throws <ArgumentException>( () => builder.Add(new NullNameModule()), ex => Assert.AreEqual("module", ex.ParamName)); }
public void NativeModuleRegistry_ArgumentChecks() { var builder = new NativeModuleRegistry.Builder(); AssertEx.Throws <ArgumentNullException>( () => builder.Add(null), ex => Assert.AreEqual("module", ex.ParamName)); }
private void ProcessPackage( IReactPackage reactPackage, ReactContext reactContext, NativeModuleRegistry.Builder nativeRegistryBuilder) { foreach (var nativeModule in reactPackage.CreateNativeModules(reactContext)) { nativeRegistryBuilder.Add(nativeModule); } }
private void ProcessPackage( IReactPackage reactPackage, ReactContext reactContext, NativeModuleRegistry.Builder nativeRegistryBuilder, JavaScriptModuleRegistry.Builder jsModulesBuilder) { foreach (var nativeModule in reactPackage.CreateNativeModules(reactContext)) { nativeRegistryBuilder.Add(nativeModule); } foreach (var type in reactPackage.CreateJavaScriptModulesConfig()) { jsModulesBuilder.Add(type); } }
public void NativeModuleRegistry_Override_Disallowed() { var builder = new NativeModuleRegistry.Builder(); builder.Add(new OverrideDisallowedModule()); AssertEx.Throws<InvalidOperationException>(() => builder.Add(new OverrideDisallowedModule())); }