public void IsLogForEvent_WhenTheEventMatchesReturnsTrue() { var queue = new Mock <IQueue>(); var processor = new EventLogQueueProcessor <TestData.Contracts.StandardContract.TransferEvent>(queue.Object); var transferEvent = TestData.Contracts.StandardContract.SampleTransferLog(); var nonTransferLog = new FilterLog(); Assert.True(processor.IsLogForEvent(transferEvent)); Assert.False(processor.IsLogForEvent(nonTransferLog)); }
public void IsLogForEvent_WhenPredicateIsNotNull_ReturnsPredicateResult() { var queue = new Mock <IQueue>(); var processor = new EventLogQueueProcessor(queue.Object, predicate: log => false); var transferEvent = TestData.Contracts.StandardContract.SampleTransferLog(); Assert.False(processor.IsLogForEvent(transferEvent)); }
public void IsLogForEvent_WhenPredicateIsNull_ReturnsTrue() { var queue = new Mock <IQueue>(); var processor = new EventLogQueueProcessor(queue.Object); var transferEvent = TestData.Contracts.StandardContract.SampleTransferLog(); Assert.True(processor.IsLogForEvent(transferEvent)); }