public async Task UploadsStreamInBlocksIfLengthNotAvailable()
        {
            TestStream        content  = new TestStream(_async, null, TestStream.Read(0, 10));
            TrackingArrayPool testPool = new TrackingArrayPool();
            StagingSink       sink     = new StagingSink();

            Mock <BlockBlobClient> clientMock = new Mock <BlockBlobClient>(MockBehavior.Strict, new Uri("http://mock"), new BlobClientOptions());

            clientMock.SetupGet(c => c.ClientConfiguration).CallBase();
            SetupInternalStaging(clientMock, sink);

            var uploader = new PartitionedUploader <BlobUploadOptions, BlobContentInfo>(BlockBlobClient.GetPartitionedUploaderBehaviors(clientMock.Object), default, arrayPool: testPool);
Exemple #2
0
        public async Task UploadsStreamInBlocksIfLengthNotAvailable()
        {
            TestStream        content  = new TestStream(_async, null, TestStream.Read(0, 10));
            TrackingArrayPool testPool = new TrackingArrayPool();
            StagingSink       sink     = new StagingSink();

            Mock <BlockBlobClient> clientMock = new Mock <BlockBlobClient>(MockBehavior.Strict, new Uri("http://mock"), new BlobClientOptions());

            clientMock.SetupGet(c => c.ClientDiagnostics).CallBase();
            SetupAsyncStaging(clientMock, sink);

            PartitionedUploader        uploader = new PartitionedUploader(clientMock.Object, default, arrayPool: testPool);