public void ShouldThrow() { var cfg = new Cfg.Configuration(); var fluent = new FluentConfiguration(); fluent.SetRevisionEntity <RevisionEntity>(rev => rev.Number, rev => rev.Timestamp); cfg.Executing(x => x.IntegrateWithEnvers(new AuditEventListener(), fluent)) .Throws <FluentException>(); }
public void ShouldThrow() { var currAss = Assembly.GetExecutingAssembly(); var cfg = new Cfg.Configuration() .Configure() .AddResource("NHibernate.Envers.Tests.NetSpecific.Integration.RevInfo.RevEntityIncorrectListenerType.hbm.xml", currAss); cfg.Executing(x => x.IntegrateWithEnvers(new AuditEventListener(), new AttributeConfiguration())).Throws <MappingException>(); }
public void MultipleRevisionEntitiesShouldThrow() { var currAss = Assembly.GetExecutingAssembly(); var cfg = new Cfg.Configuration() .Configure() .AddResource("NHibernate.Envers.Tests.Entities.RevEntity.CustomRevEntity.hbm.xml", currAss) .AddResource("NHibernate.Envers.Tests.Entities.RevEntity.CustomDateRevEntity.hbm.xml", currAss); cfg.Executing(x => x.IntegrateWithEnvers(new AuditEventListener(), new AttributeConfiguration())).Throws <MappingException>(); }