public void ToManyToManyTableNameCamelCaseTest() { NamingConventionsConfig config = new NamingConventionsConfig(null); NamingEngine namingEngine = new NamingEngine(config); // Table Name => Default config.UseConventionForTableNames(TablesNamingConvention.CamelCase); config.UseConventionForManyToManyTableNames(ManyToManyTableNamingConvention.FirstTableName_SecondTableName); string result = namingEngine.ToManyToManyTableName(typeof(Product), typeof(Category)); Assert.AreEqual("category_product", result); // Table Name => First Table Name & Second Table Name config.UseConventionForManyToManyTableNames(ManyToManyTableNamingConvention.FirstTableName_SecondTableName); result = namingEngine.ToManyToManyTableName(typeof(Category), typeof(Product)); Assert.AreEqual("category_product", result); // Table Name => First Table Name to Second Table Name config.UseConventionForManyToManyTableNames(ManyToManyTableNamingConvention.FirstTableNameToSecondTableName); result = namingEngine.ToManyToManyTableName(typeof(Category), typeof(Product)); Assert.AreEqual("categoryToProduct", result); // Table Name => Custom config.UseCustomConventionForManyToManyTableNames((f, s) => { Assert.AreEqual(typeof(Category), f); Assert.AreEqual(typeof(Product), s); return "CustomTableName"; }); result = namingEngine.ToManyToManyTableName(typeof(Category), typeof(Product)); Assert.AreEqual("CustomTableName", result); }