public void LogsWithTheRightType() { // arrange var hasListOfLogStatements = new ListLoggerFactory(); CirqusLoggerFactory.Current = hasListOfLogStatements; // act _logger.Info("Woot!"); // assert var line = hasListOfLogStatements.LoggedLines.Single(); Assert.That(line.OwnerType, Is.EqualTo(typeof(TestCirqusLoggerFactory))); }
public void LogsWithTheRightType() { // arrange var hasListOfLogStatements = new ListLoggerFactory(); CirqusLoggerFactory.Current = hasListOfLogStatements; var loggingClass = new LoggingClass(); // act loggingClass.LogSomething(); // assert var line = hasListOfLogStatements.LoggedLines.Single(); Assert.That(line.OwnerType, Is.EqualTo(typeof(LoggingClass))); }
protected override void DoSetUp() { _listLoggerFactory = new ListLoggerFactory(); CirqusLoggerFactory.Current = _listLoggerFactory; _seqNos.Clear(); var database = MongoHelper.InitializeTestDatabase(); _source = new MongoDbEventStore(database, "EventSrc"); _destination = new MongoDbEventStore(database, "EventDst"); var source = new ThrowsAnErrorOnceInAWhile(_source, 0.5); var destination = new ThrowsAnErrorOnceInAWhile(_destination, 0.5); _replicator = new EventReplicator(source, destination) { TimeToPauseOnError = TimeSpan.Zero //< don't wait in this test }; RegisterForDisposal(_replicator); _replicator.Start(); }