// TODO: add more test cases public void TestUnsupportedDirection() { DMLibDataInfo sourceDataInfo = new DMLibDataInfo(string.Empty); DMLibDataHelper.AddOneFileInBytes(sourceDataInfo.RootNode, DMLibTestBase.FileName, 1024); var result = this.ExecuteTestCase(sourceDataInfo, new TestExecutionOptions <DMLibDataInfo>()); Test.Assert(result.Exceptions.Count == 1, "Verify exception is thrown."); Exception exception = result.Exceptions[0]; if (DMLibCopyMethod.ServiceSideSyncCopy == DMLibTestContext.CopyMethod) { Test.Assert(exception is NotSupportedException, "Verify exception is NotSupportedException."); if (DMLibTestContext.DestType == DMLibDataType.CloudFile) { VerificationHelper.VerifyExceptionErrorMessage(exception, "Copying to Azure File Storage with service side synchronous copying is not supported."); } else { VerificationHelper.VerifyExceptionErrorMessage(exception, "Copying from Azure File Storage with service side synchronous copying is not supported."); } } else if (DMLibTestContext.SourceType == DMLibDataType.URI) { Test.Assert(exception is NotSupportedException, "Verify exception is NotSupportedException."); if (DMLibTestContext.DestType == DMLibDataType.CloudFile) { VerificationHelper.VerifyExceptionErrorMessage(exception, "Copying from uri to Azure File Storage synchronously is not supported"); } else { VerificationHelper.VerifyExceptionErrorMessage(exception, "Copying from uri to Azure Blob Storage synchronously is not supported"); } } else if (DMLibTestBase.IsCloudBlob(DMLibTestContext.SourceType) && DMLibTestBase.IsCloudBlob(DMLibTestContext.DestType)) { Test.Assert(exception is InvalidOperationException, "Verify exception is InvalidOperationException."); VerificationHelper.VerifyExceptionErrorMessage(exception, "Blob type of source and destination must be the same."); } else { Test.Assert(exception is InvalidOperationException, "Verify exception is InvalidOperationException."); VerificationHelper.VerifyExceptionErrorMessage(exception, string.Format("Copying from File Storage to {0} Blob Storage asynchronously is not supported.", MapBlobDataTypeToBlobType(DMLibTestContext.DestType))); } Test.Assert(DMLibDataHelper.Equals(new DMLibDataInfo(string.Empty), result.DataInfo), "Verify no file is transfered."); }
public static void MyClassCleanup() { DMLibTestBase.BaseClassCleanup(); }
public static void MyClassInitialize(TestContext testContext) { DMLibTestBase.BaseClassInitialize(testContext); }
public static void MyClassInitialize(TestContext testContext) { Test.Info("Class Initialize: SASTokenVersionTest"); DMLibTestBase.BaseClassInitialize(testContext); }
public static void MyClassInitialize(TestContext testContext) { Test.Info("Class Initialize: ProgressHandlerTest"); DMLibTestBase.BaseClassInitialize(testContext); }
public static void MyClassInitialize(TestContext testContext) { Test.Info("Class Initialize: ShouldTransferTest"); DMLibTestBase.BaseClassInitialize(testContext); }
public static void MyClassInitialize(TestContext testContext) { Test.Info("Class Initialize: NonseekableStreamTest"); DMLibTestBase.BaseClassInitialize(testContext); DMLibTestBase.CleanupSource = false; }
public static void MyClassInitialize(TestContext testContext) { Test.Info("Class Initialize: SetContentTypeTest"); DMLibTestBase.BaseClassInitialize(testContext); }
public static void MyClassInitialize(TestContext testContext) { Test.Info("Class Initialize: AccessConditionTest"); DMLibTestBase.BaseClassInitialize(testContext); }
public static void MyClassInitialize(TestContext testContext) { Test.Info("Class Initialize: DelimiterTest"); DMLibTestBase.BaseClassInitialize(testContext); }
public static void MyClassInitialize(TestContext testContext) { Test.Info("Class Initialize: UnsupportedDirectionTest"); DMLibTestBase.BaseClassInitialize(testContext); }
public static void MyClassInitialize(TestContext testContext) { Test.Info("Class Initialize: CheckContentMD5Test"); DMLibTestBase.BaseClassInitialize(testContext); }
public static void MyClassInitialize(TestContext testContext) { Test.Info("Class Initialize: EncryptionScopeTest"); DMLibTestBase.BaseClassInitialize(testContext); }