예제 #1
0
        public UploadTests(CourseDirectoryApplicationFactory factory)
            : base(factory)
        {
            DataUploadsContainerClient = new Mock <BlobContainerClient>();

            DataUploadsContainerClient
            .Setup(mock => mock.CreateIfNotExistsAsync(
                       It.IsAny <PublicAccessType>(),
                       It.IsAny <IDictionary <string, string> >(),
                       It.IsAny <CancellationToken>()))
            .ReturnsAsync(CreateMockResponse(BlobsModelFactory.BlobContainerInfo(new ETag(), Clock.UtcNow)));

            BlobServiceClient
            .Setup(mock => mock.GetBlobContainerClient("data-uploads"))
            .Returns(DataUploadsContainerClient.Object);