public async Task Can_stream_typed_objects()
        {
            await Fixture.Value.AddAsync(CreateBlock());

            var projection   = new BlockObjectProjection(Fixture.Value, TypeProvider);
            var transactions = projection.Stream <Transaction>();

            Assert.NotNull(transactions);
            Assert.Equal(1, transactions.Count());
        }
Example #2
0
        public async Task Can_stream_typed_objects_and_headers()
        {
            await Fixture.Value.AddAsync(CreateBlock());

            var objectProjection = new BlockObjectProjection(Fixture.Value, TypeProvider);
            var objectStream     = objectProjection.Stream <Transaction>();

            Assert.NotNull(objectStream);
            Assert.Single(objectStream);

            var headerStream = Fixture.Value.StreamAllBlockHeaders(true, 2);

            Assert.NotNull(headerStream);
            Assert.Single(headerStream);
        }