This repository has been archived by the owner on Feb 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
93 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
Documentation/DecaTec.WebDav.Documentation/Content/VersionHistory/v1.1.2.0.aml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<topic id="e528ad2f-0c4b-4aff-a9a0-14d1c61df5e7" revisionNumber="1"> | ||
<developerConceptualDocument | ||
xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" | ||
xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
<introduction></introduction> | ||
|
||
<section> | ||
<title>Changes in release v1.1.2.0</title> | ||
<content> | ||
|
||
<list class="bullet"> | ||
|
||
<listItem> | ||
<para> | ||
WebDavHelper: Added method to receive the ActiveLock from a WebDavResponseMessage. | ||
</para> | ||
</listItem> | ||
|
||
</list> | ||
|
||
</content> | ||
</section> | ||
|
||
<relatedTopics> | ||
<link xlink:href="55c4b378-829f-44e2-af56-20a587c2d24b" /> | ||
</relatedTopics> | ||
</developerConceptualDocument> | ||
</topic> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,7 +56,7 @@ public static void ClassSetup(TestContext ctx) | |
{ | ||
throw new FileNotFoundException("The configuration file cannot be found. Make sure that there is a file 'TestConfiguration.txt' in the test's output folder containing data about the WebDAV server to test against.", ConfigurationFile, ex); | ||
} | ||
} | ||
} | ||
|
||
private WebDavClient CreateWebDavClientWithDebugHttpMessageHandler() | ||
{ | ||
|
@@ -73,7 +73,7 @@ private WebDavClient CreateWebDavClientWithDebugHttpMessageHandler() | |
var debugHttpMessageHandler = new DebugHttpMessageHandler(httpClientHandler); | ||
var wdc = new WebDavClient(debugHttpMessageHandler); | ||
return wdc; | ||
} | ||
} | ||
|
||
#region Copy | ||
|
||
|
@@ -87,7 +87,7 @@ public void UIT_WebDavClient_Copy() | |
var testFile = UriHelper.CombineUrl(testCollectionSource, TestFile, true); | ||
|
||
// Create source collection. | ||
var response = client.MkcolAsync(testCollectionSource).Result; | ||
var response = client.MkcolAsync(testCollectionSource).Result; | ||
var mkColResponseSuccess = response.IsSuccessStatusCode; | ||
|
||
// Put file. | ||
|
@@ -96,11 +96,11 @@ public void UIT_WebDavClient_Copy() | |
var content = new StreamContent(fileStream); | ||
response = client.PutAsync(testFile, content).Result; | ||
} | ||
|
||
var putResponseSuccess = response.IsSuccessStatusCode; | ||
|
||
// Copy. | ||
response = client.CopyAsync(testCollectionSource, testCollectionDestination).Result; | ||
response = client.CopyAsync(testCollectionSource, testCollectionDestination).Result; | ||
var copyResponseSuccess = response.IsSuccessStatusCode; | ||
|
||
// PropFind. | ||
|
@@ -506,19 +506,21 @@ public void UIT_WebDavClient_LockRefreshLockUnlock() | |
return; | ||
|
||
using (var client = CreateWebDavClientWithDebugHttpMessageHandler()) | ||
{ | ||
{ | ||
var userEmail = "[email protected]"; | ||
|
||
// Lock. | ||
var lockInfo = new LockInfo() | ||
{ | ||
LockScope = LockScope.CreateExclusiveLockScope(), | ||
LockType = LockType.CreateWriteLockType(), | ||
OwnerHref = "[email protected]" | ||
OwnerHref = userEmail | ||
}; | ||
|
||
var response = client.LockAsync(webDavRootFolder, WebDavTimeoutHeaderValue.CreateWebDavTimeout(TimeSpan.FromMinutes(1)), WebDavDepthHeaderValue.Infinity, lockInfo).Result; | ||
var lockResponseSuccess = response.IsSuccessStatusCode; | ||
LockToken lockToken = WebDavHelper.GetLockTokenFromWebDavResponseMessage(response); | ||
ActiveLock activeLock = WebDavHelper.GetActiveLockFromWebDavResponseMessage(response); | ||
|
||
// Refresh lock. | ||
response = client.RefreshLockAsync(webDavRootFolder, WebDavTimeoutHeaderValue.CreateWebDavTimeout(TimeSpan.FromSeconds(10)), lockToken).Result; | ||
|
@@ -530,6 +532,7 @@ public void UIT_WebDavClient_LockRefreshLockUnlock() | |
|
||
Assert.IsTrue(lockResponseSuccess); | ||
Assert.IsNotNull(lockToken); | ||
Assert.AreEqual(userEmail, activeLock.OwnerHref); | ||
Assert.IsTrue(refreshLockResponseSuccess); | ||
Assert.IsTrue(unlockResponseSuccess); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters