Exemplo n.º 1
0
            public async Task GetBlob_DisconnectedDuringGet()
            {
                var data   = new byte[10 * 1024 * 1024];
                var blobId = await _session.CreateBlobAsync(data);


                Func <Task> f = () => _session.GetBlobAsync(blobId);

                await Task.Delay(100);

                await _session.StopHostAsync();

                await f.ShouldThrowAsync <RHostDisconnectedException>();
            }
Exemplo n.º 2
0
 public async Task GetBlob_DisconnectedFromTheStart()
 {
     using (var session = new RSession(0, _brokerConnector, () => { })) {
         Func <Task> f = () => session.GetBlobAsync(1);
         await f.ShouldThrowAsync <RHostDisconnectedException>();
     }
 }