Example #1
0
        public async Task Execute_ReturnsHeaderWithNewETag(
            [Frozen] IReadOnlyList <OperationResult> batchResult,
            JournaledEvent[] events,
            AppendOperation operation)
        {
            operation.Prepare(events);

            var result = await operation.ExecuteAsync();

            Assert.Equal(batchResult[0].ETag, result.ETag);
        }
Example #2
0
        public async Task Execute_ReturnsHeaderWithIncrementedVersion(
            [Frozen] StreamVersion currentVersion,
            JournaledEvent[] events,
            AppendOperation operation)
        {
            var targetVersion = currentVersion.Increment(events.Count());

            operation.Prepare(events);

            var result = await operation.ExecuteAsync();

            Assert.Equal(targetVersion, result.Version);
        }