示例#1
0
 public async Task ShouldThrowErrorForInvalidInput()
 {
     var query = new FetchDocumentLocationQuery {
         RowKey = Guid.Empty
     };
     await Assert.ThrowsAsync <ValidationException>(() => SendAsync(query));
 }
示例#2
0
        public async Task ShouldFetchDocumentLocation()
        {
            var name    = "ITestFetch-" + DateTime.Now.ToString();
            var command = new AddNewDocumentCommand
            {
                Name     = name,
                Location = Guid.NewGuid().ToString(),
                Size     = 1234
            };
            var rowKey = await SendAsync(command);

            var query = new FetchDocumentLocationQuery {
                RowKey = rowKey
            };
            var result = await SendAsync(query);

            Assert.NotNull(result);
            var documentLocation = result.DocumentLocation;

            Assert.Equal(command.Location, documentLocation);
        }