Example #1
0
		[Test] public void Test_08_TestSetDocumentVersioningForWorkspace()
		{
            Proxy.UploaderRef.Uploader uploader = new Proxy.UploaderRef.Uploader( );
			uploader.Url = Globals.UploaderUrl();
			uploader.Credentials = System.Net.CredentialCache.DefaultCredentials.GetCredential(new Uri(Globals.SharePointTestServer), "");
            string url = Globals.SiteCollectionForTests() + "/ForVersioningTesting";
		    
			if (uploader.IsDocumentVersioningEnabledForWorkspace(url))
			{
				uploader.SetDocumentVersioningForWorkspace(url, false);
				Assert.IsFalse(uploader.IsDocumentVersioningEnabledForWorkspace(url), "Failed to switch off document versioning.");
			}
			uploader.SetDocumentVersioningForWorkspace(url, true);
			Assert.IsTrue(uploader.IsDocumentVersioningEnabledForWorkspace(url), "Failed to switch on document versioning.");
			uploader.SetDocumentVersioningForWorkspace(url, false);
			Assert.IsFalse(uploader.IsDocumentVersioningEnabledForWorkspace(url), "Failed to switch off document versioning.");
		}