当前位置: 首页>>代码示例>>C#>>正文


C# TestContext.GetAzureFileSystem方法代码示例

本文整理汇总了C#中Microsoft.VisualStudio.TestTools.UnitTesting.TestContext.GetAzureFileSystem方法的典型用法代码示例。如果您正苦于以下问题:C# TestContext.GetAzureFileSystem方法的具体用法?C# TestContext.GetAzureFileSystem怎么用?C# TestContext.GetAzureFileSystem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Microsoft.VisualStudio.TestTools.UnitTesting.TestContext的用法示例。


在下文中一共展示了TestContext.GetAzureFileSystem方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TestCreateDirectory

 public void TestCreateDirectory()
 {
     var testContext = new TestContext();
     testContext.GetAzureFileSystem().CreateDirectory(FakeUri);
     testContext.TestCloudBlobClient.DidNotReceiveWithAnyArgs();
 }
开发者ID:NurimOnsemiro,项目名称:reef,代码行数:6,代码来源:TestAzureBlockBlobFileSystem.cs

示例2: TestCopyToLocal

 public void TestCopyToLocal()
 {
     var testContext = new TestContext();
     testContext.GetAzureFileSystem().CopyToLocal(FakeUri, "local");
     testContext.TestCloudBlockBlob.Received(1).DownloadToFile("local", FileMode.CreateNew);
 }
开发者ID:NurimOnsemiro,项目名称:reef,代码行数:6,代码来源:TestAzureBlockBlobFileSystem.cs

示例3: TestCopyFromLocal

 public void TestCopyFromLocal()
 {
     var testContext = new TestContext();
     testContext.GetAzureFileSystem().CopyFromLocal("local", FakeUri);
     testContext.TestCloudBlockBlob.Received(1).UploadFromFile("local", FileMode.Open);
 }
开发者ID:NurimOnsemiro,项目名称:reef,代码行数:6,代码来源:TestAzureBlockBlobFileSystem.cs

示例4: TestExists

 public void TestExists()
 {
     var testContext = new TestContext();
     testContext.GetAzureFileSystem().Exists(FakeUri);
     testContext.TestCloudBlockBlob.Received(1).Exists();
 }
开发者ID:NurimOnsemiro,项目名称:reef,代码行数:6,代码来源:TestAzureBlockBlobFileSystem.cs

示例5: TestDelete

 public void TestDelete()
 {
     var testContext = new TestContext();
     testContext.GetAzureFileSystem().Delete(new Uri(FakeUri, "container/file"));
     testContext.TestCloudBlockBlob.Received(1).Delete();
 }
开发者ID:NurimOnsemiro,项目名称:reef,代码行数:6,代码来源:TestAzureBlockBlobFileSystem.cs

示例6: TestCreateUriForPath

 public void TestCreateUriForPath()
 {
     var testContext = new TestContext();
     const string dirStructure = "container/directory";
     Assert.AreEqual(new Uri(FakeUri, dirStructure), testContext.GetAzureFileSystem().CreateUriForPath(dirStructure));
 }
开发者ID:NurimOnsemiro,项目名称:reef,代码行数:6,代码来源:TestAzureBlockBlobFileSystem.cs

示例7: TestDeleteDirectoryRecursive

 public void TestDeleteDirectoryRecursive()
 {
     var testContext = new TestContext();
     testContext.TestCloudBlobDirectory.ListBlobs(true).ReturnsForAnyArgs(Enumerable.Repeat(testContext.TestCloudBlob, 5));
     testContext.GetAzureFileSystem().DeleteDirectory(new Uri("http://test.com/container/directory/directory"));
     testContext.TestCloudBlobClient.Received(1).GetContainerReference("container");
     testContext.TestCloudBlobContainer.Received(1).GetDirectoryReference("directory");
     testContext.TestCloudBlobDirectory.Received(1).GetDirectoryReference("directory");
     testContext.TestCloudBlobDirectory.Received(1).ListBlobs(true);
     testContext.TestCloudBlob.Received(5).DeleteIfExists();
 }
开发者ID:NurimOnsemiro,项目名称:reef,代码行数:11,代码来源:TestAzureBlockBlobFileSystem.cs

示例8: TestDeleteDirectoryAtContainer

 public void TestDeleteDirectoryAtContainer()
 {
     var testContext = new TestContext();
     testContext.GetAzureFileSystem().DeleteDirectory(new Uri("http://test.com/test"));
     testContext.TestCloudBlobClient.Received(1).GetContainerReference("test");
     testContext.TestCloudBlobContainer.Received(1).DeleteIfExists();
 }
开发者ID:NurimOnsemiro,项目名称:reef,代码行数:7,代码来源:TestAzureBlockBlobFileSystem.cs


注:本文中的Microsoft.VisualStudio.TestTools.UnitTesting.TestContext.GetAzureFileSystem方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。