public void ToComponentForeignKeyNameTest()
        {
            NamingConventionsConfig config = new NamingConventionsConfig(null);
            NamingEngine namingEngine = new NamingEngine(config);

            config.UseConventionForComponentTableNames(ComponentsTableNamingConvention.EntityNameComponentName);
            config.UseConventionForPrimaryKeyColumnNames(PrimaryKeyColumnNamingConvention.Default);
            config.UseConventionForConstraintNames(ConstraintNamingConvention.Uppercase);

            // Foreign Key Name => Default
            config.UseConventionForForeignKeyNames(ForeignKeyNamingConvention.Default);
            string result = namingEngine.ToComponentForeignKeyName(typeof(Telephone), typeof(Customer), typeof(Customer).GetMember("Telephones").Single(), typeof(Customer).GetMember("ID").Single());
            Assert.IsTrue(string.IsNullOrEmpty(result));

            // Foreign Key Name => FK_FKTable_PKTable
            config.UseConventionForForeignKeyNames(ForeignKeyNamingConvention.FK_FKTable_PKTable);
            result = namingEngine.ToComponentForeignKeyName(typeof(Telephone), typeof(Customer), typeof(Customer).GetMember("Telephones").Single(), typeof(Customer).GetMember("ID").Single());
            Assert.AreEqual("FK__CUSTOMER_TELEPHONE__CUSTOMER", result);

            // Foreign Key Name => FK_FKTable_PKTable_PKColumn
            config.UseConventionForForeignKeyNames(ForeignKeyNamingConvention.FK_FKTable_PKTable_FKColumn);
            result = namingEngine.ToComponentForeignKeyName(typeof(Telephone), typeof(Customer), typeof(Customer).GetMember("Telephones").Single(), typeof(Customer).GetMember("ID").Single());
            Assert.AreEqual("FK__CUSTOMER_TELEPHONE__CUSTOMER__ID", result);

            // Foreign Key Name => FKTable_PKTable_FK
            config.UseConventionForForeignKeyNames(ForeignKeyNamingConvention.FKTable_PKTable_FK);
            result = namingEngine.ToComponentForeignKeyName(typeof(Telephone), typeof(Customer), typeof(Customer).GetMember("Telephones").Single(), typeof(Customer).GetMember("ID").Single());
            Assert.AreEqual("CUSTOMER_TELEPHONE__CUSTOMER__FK", result);

            // Foreign Key Name => FKTable_PKTable_PKColumn_FK
            config.UseConventionForForeignKeyNames(ForeignKeyNamingConvention.FKTable_PKTable_FKColumn_FK);
            result = namingEngine.ToComponentForeignKeyName(typeof(Telephone), typeof(Customer), typeof(Customer).GetMember("Telephones").Single(), typeof(Customer).GetMember("ID").Single());
            Assert.AreEqual("CUSTOMER_TELEPHONE__CUSTOMER__ID__FK", result);

            // Foreign Key Name => FKTable_PKTable_PKColumn_FK
            config.UseCustomConventionForForeignKeyNames((s, t, f, i) =>
                {
                    Assert.AreEqual(typeof(Customer), s);
                    Assert.AreEqual(typeof(Telephone), t);
                    Assert.AreEqual(typeof(Customer).GetMember("Telephones").Single(), f);
                    Assert.AreEqual(typeof(Customer).GetMember("ID").Single(), i);

                    return "CustomForeignKeyName";
                });
            result = namingEngine.ToComponentForeignKeyName(typeof(Customer), typeof(Telephone), typeof(Customer).GetMember("Telephones").Single(), typeof(Customer).GetMember("ID").Single());
            Assert.AreEqual("CustomForeignKeyName", result);
        }
        public void ToComponentForeignKeyNameNoCustomMethodTest()
        {
            NamingConventionsConfig config = new NamingConventionsConfig(null);
            NamingEngine namingEngine = new NamingEngine(config);

            // Component Table Name => Custom convention
            config.UseConventionForForeignKeyNames(ForeignKeyNamingConvention.Custom);
            string result = namingEngine.ToComponentForeignKeyName(typeof(Customer), typeof(Telephone), typeof(Customer).GetMember("Telephones").Single(), typeof(Customer).GetMember("ID").Single());
        }