Permalink
Browse files

Renamed the Table overload which defined <join>s to actually be calle…

…d Join
  • Loading branch information...
jagregory committed Aug 4, 2009
1 parent 3109c19 commit 3ea8d85a387bf4a5a019a0949ca9e370b23a5872
@@ -364,7 +364,7 @@ public void CanSetSchema()
public void SpanningClassAcrossTwoTables()
{
new MappingTester<MappedObject>()
- .ForMapping(m => m.Table("tableTwo", t => t.Map(x => x.Name)))
+ .ForMapping(m => m.Join("tableTwo", t => t.Map(x => x.Name)))
.Element("class/join").Exists();
}
@@ -10,23 +10,23 @@ public class JoinPartTester
public void CreatesJoinElement()
{
new MappingTester<JoinTarget>()
- .ForMapping(m => m.Table("myTable", t => t.Map(x => x.Name)))
+ .ForMapping(m => m.Join("myTable", t => t.Map(x => x.Name)))
.Element("class/join").Exists();
}
[Test]
public void JoinElementHasTableName()
{
new MappingTester<JoinTarget>()
- .ForMapping(m => m.Table("myTable", t => t.Map(x => x.Name)))
+ .ForMapping(m => m.Join("myTable", t => t.Map(x => x.Name)))
.Element("class/join").HasAttribute("table", "myTable");
}
[Test]
public void PropertiesInJoinAreOutputInTheJoinElement()
{
new MappingTester<JoinTarget>()
- .ForMapping(m => m.Table("myTable", t => t.Map(x => x.Name)))
+ .ForMapping(m => m.Join("myTable", t => t.Map(x => x.Name)))
.Element("class/join/property").HasAttribute("name", "Name");
}
@@ -37,7 +37,7 @@ public void PropertiesDefinedInClassAndPropertiesDefinedInJoinAreSeparateInOutpu
.ForMapping(m =>
{
m.Map(x => x.Name);
- m.Table("myTable", t => t.Map(x => x.CustomerName));
+ m.Join("myTable", t => t.Map(x => x.CustomerName));
})
.Element("class/property").HasAttribute("name", "Name")
.Element("class/join/property").HasAttribute("name", "CustomerName");
@@ -47,23 +47,23 @@ public void PropertiesDefinedInClassAndPropertiesDefinedInJoinAreSeparateInOutpu
public void JoinElementAlwaysHasAKey()
{
new MappingTester<JoinTarget>()
- .ForMapping(m => m.Table("myTable", t => t.Map(x => x.Name)))
+ .ForMapping(m => m.Join("myTable", t => t.Map(x => x.Name)))
.Element("class/join/key").Exists();
}
[Test]
public void KeyDefaultsToClassNameId()
{
new MappingTester<JoinTarget>()
- .ForMapping(m => m.Table("myTable", t => t.Map(x => x.Name)))
+ .ForMapping(m => m.Join("myTable", t => t.Map(x => x.Name)))
.Element("class/join/key/column").HasAttribute("name", "JoinTargetID");
}
[Test]
public void CanOverrideKey()
{
new MappingTester<JoinTarget>()
- .ForMapping(m => m.Table("myTable", t => t.KeyColumn("ID")))
+ .ForMapping(m => m.Join("myTable", t => t.KeyColumn("ID")))
.Element("class/join/key/column").HasAttribute("name", "ID");
}
@@ -76,7 +76,7 @@ public void JoinIsAlwaysLastInTheClassElement()
{
m.Map(x => x.Name);
m.HasMany(x => x.Children);
- m.Table("myTable", t => t.KeyColumn("ID"));
+ m.Join("myTable", t => t.KeyColumn("ID"));
})
.Element("class/*[last()]").HasName("join");
}
@@ -249,7 +249,7 @@ public void LazyLoad()
/// </summary>
/// <param name="tableName">Joined table name</param>
/// <param name="action">Joined table mapping</param>
- public void Table(string tableName, Action<JoinPart<T>> action)
+ public void Join(string tableName, Action<JoinPart<T>> action)
{
var join = new JoinPart<T>(tableName);
action(join);

0 comments on commit 3ea8d85

Please sign in to comment.