public void WhenGetAuditConfMultipleTimesThenDoesNotThrowsForDupicatedMappings() { var cfg = new Cfg.Configuration(); cfg.Configure(); cfg.AddXml(SimpleMapping); AuditConfiguration.GetFor(cfg); //<< external call AuditConfiguration.SetConfigMetas(cfg, new AttributeConfiguration()); var listeners = new[] { new AuditEventListener() }; cfg.AppendListeners(ListenerType.PostInsert, listeners); cfg.AppendListeners(ListenerType.PostUpdate, listeners); cfg.AppendListeners(ListenerType.PostDelete, listeners); cfg.AppendListeners(ListenerType.PostCollectionRecreate, listeners); cfg.AppendListeners(ListenerType.PreCollectionRemove, listeners); cfg.AppendListeners(ListenerType.PreCollectionUpdate, listeners); Executing.This(() => { using (cfg.BuildSessionFactory()) { // build the session factory to run initialization of listeners and be completelly sure // there isn't problems } }).Should().NotThrow(); }