CMIS-WS .NET tests

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12874 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Logneon
2009-01-23 10:30:06 +00:00
parent dedef025d6
commit eaccbb3bf9
95 changed files with 63712 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
using System;
using NUnit.Framework;
using WcfTestClient.DiscoveryService;
namespace WcfCmisWSTests {
///
/// author: Dmitry Velichkevich
///
[TestFixture]
public class DiscoveryServiceClientTest {
private const string TEXTUAL_TEN = "10";
private const string SAMPLE_QUERY = "SELECT * FROM DOCUMENT";
[Test]
public void testCmisSqlFeature() {
try {
assertQuering(AbstractCmisServicesHelper.createDiscoveryServiceClient());
} catch(Exception e) {
Assert.Fail(e.Message);
}
}
private static void assertQuering(DiscoveryServicePortClient client) {
bool hasMoreElements;
cmisObjectType[] response = client.query(SAMPLE_QUERY, false, TEXTUAL_TEN,
AbstractCmisServicesHelper.TEXTUAL_ZERO, false, null, out hasMoreElements);
Assert.IsTrue((response != null) && (response[0] != null));
Assert.IsTrue(hasMoreElements);
Assert.AreEqual(response.Length, int.Parse(TEXTUAL_TEN));
}
}
}