Beispiel #1
0
        public async Task TransactionFilter_From_Reports_Matches()
        {
            var tx = new Transaction {
                From = Address1
            };
            var filter = TransactionFilter.From(Address1);

            Assert.True(await filter.IsMatchAsync(tx));
        }
Beispiel #2
0
        public async Task TransactionFilter_From_Many_Reports_Matches()
        {
            var tx1 = new Transaction {
                From = Address1
            };
            var tx2 = new Transaction {
                From = Address2
            };
            var tx3 = new Transaction {
                From = UnknownAddress
            };

            var filter = TransactionFilter.From(new [] { Address1, Address2 });

            Assert.True(await filter.IsMatchAsync(tx1));
            Assert.True(await filter.IsMatchAsync(tx2));
            Assert.False(await filter.IsMatchAsync(tx3));
        }