public void CantSetGeneratorAssigned() { var hbmId = new HbmCollectionId(); var collectionIdMapper = new CollectionIdMapper(hbmId); Assert.That(() => collectionIdMapper.Generator(Generators.Assigned), Throws.TypeOf <NotSupportedException>()); }
public void WhenForceTypeThenNotChangeType() { var hbmId = new HbmCollectionId(); var collectionIdMapper = new CollectionIdMapper(hbmId); collectionIdMapper.Type((IIdentifierType)NHibernateUtil.Int64); collectionIdMapper.Generator(Generators.HighLow); Assert.That(hbmId.generator.@class, Is.EqualTo("hilo")); Assert.That(hbmId.type, Is.EqualTo("Int64")); }