mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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:
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user