public void WhenSetTypeByICompositeUserTypeThenSetTypeName() { var mapping = new HbmMapKey(); var mapper = new MapKeyMapper(mapping); Assert.That(() => mapper.Type <MyCompoType>(), Throws.Nothing); Assert.That(mapping.Type.name, Does.Contain(nameof(MyCompoType))); }
public void WhenSetTypeByITypeTypeThenSetType() { var mapping = new HbmMapKey(); var mapper = new MapKeyMapper(mapping); mapper.Type <EnumStringType <MyEnum> >(); mapping.Type.name.Should().Contain(typeof(EnumStringType <MyEnum>).FullName); }
public void WhenSetTypeByIUserTypeThenSetTypeName() { var mapping = new HbmMapKey(); var mapper = new MapKeyMapper(mapping); mapper.Type <MyType>(); mapping.Type.name.Should().Contain("MyType"); }
public void WhenSetTypeByITypeThenSetTypeName() { var mapping = new HbmMapKey(); var mapper = new MapKeyMapper(mapping); mapper.Type(NHibernateUtil.String); mapping.Type.name.Should().Be.EqualTo("String"); }
public void WhenSetMultiColumnsValuesThenAddColumns() { var mapping = new HbmMapKey(); var mapper = new MapKeyMapper(mapping); mapper.Type <MyType>(); mapper.Columns(cm => { cm.Name("column1"); cm.Length(50); }, cm => { cm.Name("column2"); cm.SqlType("VARCHAR(10)"); }); mapping.Columns.Should().Have.Count.EqualTo(2); }
public void WhenSetTypeByIUserTypeThenSetTypeName() { var mapping = new HbmMapKey(); var mapper = new MapKeyMapper(mapping); mapper.Type<MyType>(); mapping.Type.name.Should().Contain("MyType"); }
public void WhenSetTypeByITypeTypeThenSetType() { var mapping = new HbmMapKey(); var mapper = new MapKeyMapper(mapping); mapper.Type<EnumStringType<MyEnum>>(); mapping.Type.name.Should().Contain(typeof(EnumStringType<MyEnum>).FullName); }
public void WhenSetMultiColumnsValuesThenAddColumns() { var mapping = new HbmMapKey(); var mapper = new MapKeyMapper(mapping); mapper.Type<MyType>(); mapper.Columns(cm => { cm.Name("column1"); cm.Length(50); }, cm => { cm.Name("column2"); cm.SqlType("VARCHAR(10)"); }); mapping.Columns.Should().Have.Count.EqualTo(2); }