System.Data.Entity.DbConfigurationTests.SetContextFactory.Non_generic_SetContextFactory_checks_arguments C# (CSharp) Method

Non_generic_SetContextFactory_checks_arguments() private method

private Non_generic_SetContextFactory_checks_arguments ( ) : void
return void
            public void Non_generic_SetContextFactory_checks_arguments()
            {
                Assert.Equal(
                    "contextType",
                    Assert.Throws<ArgumentNullException>(() => new DbConfiguration().SetContextFactory(null, () => null)).ParamName);

                Assert.Equal(
                    "factory",
                    Assert.Throws<ArgumentNullException>(() => new DbConfiguration().SetContextFactory(typeof(SomeContext), null)).ParamName);

                Assert.Equal(
                    Strings.ContextFactoryContextType("System.Random"),
                    Assert.Throws<ArgumentException>(
                        () => new DbConfiguration().SetContextFactory(typeof(Random), () => null)).Message);
            }