Ejemplo n.º 1
0
        public async Task ReadResponse()
        {
            var command = new SetCommand();
            await StorageCommandValidator.AssertReadResponse(command, StorageCommandResult.Stored, true);

            await StorageCommandValidator.AssertReadResponseFailure <SetCommand, bool>(command, StorageCommandResult.NotStored);

            await StorageCommandValidator.AssertReadResponseFailure <SetCommand, bool>(command, StorageCommandResult.NotFound);

            await StorageCommandValidator.AssertReadResponseFailure <SetCommand, bool>(command, StorageCommandResult.Exists);
        }
Ejemplo n.º 2
0
        public async Task ReadResponse()
        {
            var command = new CasCommand();
            await StorageCommandValidator.AssertReadResponse(command, StorageCommandResult.Stored, CasResult.Stored);

            await StorageCommandValidator.AssertReadResponseFailure <CasCommand, CasResult>(command, StorageCommandResult.NotStored);

            await StorageCommandValidator.AssertReadResponse(command, StorageCommandResult.Exists, CasResult.Exists);

            await StorageCommandValidator.AssertReadResponse(command, StorageCommandResult.NotFound, CasResult.NotFound);
        }