Files
alfresco-community-repo/source/test/dotnet/CmisWS/Source/MultiFilingServiceClientTest.cs
2009-01-23 10:30:06 +00:00

43 lines
2.1 KiB
C#

using NUnit.Framework;
using System.Collections.Generic;
namespace WcfCmisWSTests {
///
/// author: Dmitry Velichkevich
///
[TestFixture]
public class MultiFilingServiceClientTest {
[Test]
public void testParentAdding() {
KeyValuePair<string, KeyValuePair<string, string[]>> multifilledDocument =
AbstractCmisServicesHelper.createMultiFilledDocument(
AbstractCmisServicesHelper.getAndAssertRootFolder());
AbstractCmisServicesHelper.assertDocumentParents(multifilledDocument.Value.Key,
multifilledDocument.Value.Value);
AbstractCmisServicesHelper.deleteAndAssertDocument(multifilledDocument.Value.Key);
AbstractCmisServicesHelper.deleteAndAssertFolder(multifilledDocument.Key, false);
}
[Test]
public void testParentAddingAndRemoving() {
KeyValuePair<string, KeyValuePair<string, string[]>> multifilledDocument =
AbstractCmisServicesHelper.createMultiFilledDocument(
AbstractCmisServicesHelper.getAndAssertRootFolder());
AbstractCmisServicesHelper.createMultiFilingServiceClient().removeObjectFromFolder(
AbstractCmisServicesHelper.getAndAssertRepositoryId(),
multifilledDocument.Value.Key, multifilledDocument.Key);
AbstractCmisServicesHelper.assertDocumentParents(multifilledDocument.Value.Key,
new string[] {AbstractCmisServicesHelper.getAndAssertRootFolder()});
AbstractCmisServicesHelper.deleteAndAssertFolder(multifilledDocument.Key, false);
AbstractCmisServicesHelper.deleteAndAssertDocument(multifilledDocument.Value.Key);
}
}
}