예제 #1
0
        public async Task UploadsStreamInBlocksIfLengthNotAvailable()
        {
            TestStream        content  = new TestStream(_async, null, TestStream.Read(0, 10));
            TrackingArrayPool testPool = new TrackingArrayPool();
            AppendSink        sink     = new AppendSink();

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

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

            DataLakePartitionedUploader uploader = new DataLakePartitionedUploader(clientMock.Object, default, arrayPool: testPool);
예제 #2
0
        public async Task UploadsStreamInBlocksIfLengthNotAvailable()
        {
            TestStream        content  = new TestStream(_async, null, TestStream.Read(0, 10));
            TrackingArrayPool testPool = new TrackingArrayPool();
            AppendSink        sink     = new AppendSink();

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

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

            var uploader = new PartitionedUploader <DataLakeFileUploadOptions, PathInfo>(
                DataLakeFileClient.GetPartitionedUploaderBehaviors(clientMock.Object),
                transferOptions: default,