コード例 #1
0
            public async Task ExportsAtCursor()
            {
                var cursor = new DateTime(2018, 9, 13);

                var component = new TestComponent("hi");

                ComponentExporter
                .Setup(x => x.Export())
                .Returns(component);

                var events = new Event[0];

                EventExporter
                .Setup(x => x.Export(cursor))
                .Returns(events);

                var lastUpdated = new DateTime(2018, 9, 12);

                Cursor
                .Setup(x => x.Get(StatusUpdater.LastUpdatedCursorName))
                .ReturnsAsync(lastUpdated);

                await Exporter.Export(cursor);

                Serializer
                .Verify(
                    x => x.Serialize(cursor, lastUpdated, component, events),
                    Times.Once());
            }
コード例 #2
0
            public async Task ExportsAtCursor()
            {
                var cursor = new DateTime(2018, 9, 13);

                var component = new TestComponent("hi");

                ComponentExporter
                .Setup(x => x.Export())
                .Returns(component);

                var events = new Event[0];

                EventExporter
                .Setup(x => x.Export(cursor))
                .Returns(events);

                await Exporter.Export(cursor);

                Serializer
                .Verify(
                    x => x.Serialize(cursor, component, events),
                    Times.Once());
            }