private static AuditEvent CreateAuditEvent()
 {
     var userContext = new TestUserContext();
     var auditEvent = new AuditEvent();
     auditEvent.ClientIP = userContext.ClientIP;
     auditEvent.DateOccurred = DateTime.UtcNow;
     auditEvent.SessionIdentifier = userContext.SessionIdentifier;
     auditEvent.SiteCollectionIdentifier = userContext.SiteCollectionIdentifier;
     auditEvent.SiteIdentifier = userContext.SiteIdentifier;
     auditEvent.Url = userContext.Uri.ToString();
     auditEvent.UserName = userContext.UserName;
     auditEvent.AuditEntities = new Collection<AuditEntity>();
     auditEvent.AuditEntities.Add(CreateAuditEntity());
     auditEvent.AuditEntities.Add(CreateAuditEntity());
     return auditEvent;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="TestUserContextFactory"/> class.
 /// </summary>
 public TestUserContextFactory()
 {
     UserContext = new TestUserContext();
 }