Example #1
0
        public RavenTest()
        {
            DatabaseMemoryTarget databaseMemoryTarget = null;

            if (LogManager.Configuration != null && LogManager.Configuration.AllTargets != null)
            {
                databaseMemoryTarget = LogManager.Configuration.AllTargets.OfType <DatabaseMemoryTarget>().FirstOrDefault();
            }
            if (databaseMemoryTarget != null)
            {
                databaseMemoryTarget.ClearAll();
            }

            try
            {
                new Uri("http://fail/first/time?only=%2bplus");
            }
            catch (Exception)
            {
            }

            SystemTime.UtcDateTime = () => DateTime.UtcNow;

            ClearDatabaseDirectory();

            Directory.CreateDirectory(DbDirectory);
        }
Example #2
0
        public RavenTest()
        {
            DatabaseMemoryTarget databaseMemoryTarget = null;

            if (LogManager.Configuration != null && LogManager.Configuration.AllTargets != null)
            {
                databaseMemoryTarget = LogManager.Configuration.AllTargets.OfType <DatabaseMemoryTarget>().FirstOrDefault();
            }
            if (databaseMemoryTarget != null)
            {
                databaseMemoryTarget.ClearAll();
            }

            SystemTime.UtcDateTime = () => DateTime.UtcNow;
        }
Example #3
0
 public DatabaseMemoryTargetTests()
 {
     LogContext.DatabaseName.Value = DatabaseName;
     sut = new DatabaseMemoryTarget();
 }
 public DatabaseMemoryTargetTests()
 {
     LogContext.ResourceName = DatabaseName;
     sut = new DatabaseMemoryTarget();
 }