mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12874 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
37 lines
1.1 KiB
C#
37 lines
1.1 KiB
C#
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));
|
|
}
|
|
}
|
|
}
|