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));
        }
示例#2
0
        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));
        }
示例#3
0
        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));
        }