public void MapBuilder_Relationships_ShouldMapPublicProperties_ThatAreSpecified() { var mapBuilder = new MapBuilder(); var maps = mapBuilder.BuildRelationships<UnmappedPerson>("Pets"); Assert.IsTrue(maps.Count == 1); Assert.IsNotNull(maps["Pets"]); }
public void MapBuilder_Relationships_ShouldMapPublicProperties_ThatAreSpecified() { var mapBuilder = new MapBuilder(); var maps = mapBuilder.BuildRelationships <UnmappedPerson>("Pets"); Assert.IsTrue(maps.Relationships.Count == 1); Assert.IsNotNull(maps.Relationships["Pets"]); }
public void MapBuilder_Relationships_ShouldMapPublicProperties_ThatAreICollection() { var mapBuilder = new MapBuilder(); var maps = mapBuilder.BuildRelationships <UnmappedPerson>(); Assert.IsTrue(maps.Relationships.Count == 1); Assert.IsNotNull(maps.Relationships["Pets"]); Assert.IsTrue(_mapRepository.Relationships[_personType].Count == 1); Assert.IsNotNull(_mapRepository.Relationships[_personType]["Pets"]); }
public void InitMappings() { MapBuilder builder = new MapBuilder(); builder.BuildTable <Person>("PersonTable"); builder.BuildColumnsFromSimpleTypes <Person>() .For(p => p.ID) .SetPrimaryKey() .SetReturnValue() .SetAutoIncrement(); builder.BuildRelationships <Person>(); builder.BuildColumns <Pet>() .For(p => p.ID) .SetPrimaryKey() .SetAltName("Pet_ID") .For(p => p.Name) .SetAltName("Pet_Name"); }
public void InitMappings() { MapBuilder builder = new MapBuilder(); builder.BuildTable<Person>("PersonTable"); builder.BuildColumnsFromSimpleTypes<Person>() .For(p => p.ID) .SetPrimaryKey() .SetReturnValue() .SetAutoIncrement(); builder.BuildRelationships<Person>(); builder.BuildColumns<Pet>() .For(p => p.ID) .SetPrimaryKey() .SetAltName("Pet_ID") .For(p => p.Name) .SetAltName("Pet_Name"); }
public void MapBuilder_Relationships_ShouldMapPublicProperties_ThatAreICollection() { var mapBuilder = new MapBuilder(); var maps = mapBuilder.BuildRelationships<UnmappedPerson>(); Assert.IsTrue(maps.Relationships.Count == 1); Assert.IsNotNull(maps.Relationships["Pets"]); Assert.IsTrue(_mapRepository.Relationships[_personType].Count == 1); Assert.IsNotNull(_mapRepository.Relationships[_personType]["Pets"]); }