From 27442dd0dcfec710f241d6d53574a6fdafb6f92a Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Mon, 20 Sep 2010 21:06:56 +0000
Subject: [PATCH] Added QOP, cipher, and other config parameters to the Digest-MD5 and GSSAPI SASL bind request objects.
---
sdk/tests/unit-tests-testng/src/org/opends/sdk/requests/GSSAPISASLBindRequestTestCase.java | 45 ++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 44 insertions(+), 1 deletions(-)
diff --git a/sdk/tests/unit-tests-testng/src/org/opends/sdk/requests/GSSAPISASLBindRequestTestCase.java b/sdk/tests/unit-tests-testng/src/org/opends/sdk/requests/GSSAPISASLBindRequestTestCase.java
index da0128e..9241213 100644
--- a/sdk/tests/unit-tests-testng/src/org/opends/sdk/requests/GSSAPISASLBindRequestTestCase.java
+++ b/sdk/tests/unit-tests-testng/src/org/opends/sdk/requests/GSSAPISASLBindRequestTestCase.java
@@ -31,13 +31,17 @@
import org.opends.sdk.ByteString;
import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+import java.util.Arrays;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
/**
* Tests GSSAPI SASL Bind requests.
*/
-public abstract class GSSAPISASLBindRequestTestCase extends BindRequestTestCase
+public class GSSAPISASLBindRequestTestCase extends BindRequestTestCase
{
@DataProvider(name = "GSSAPISASLBindRequests")
public Object[][] getGSSAPISASLBindRequests() throws Exception
@@ -67,4 +71,43 @@
}
return ops;
}
+
+ @Test(enabled = false)
+ public void testBindClient(BindRequest request) throws Exception {
+ // Should setup a test krb server...
+ super.testBindClient(request);
+ }
+
+ @Test(dataProvider = "GSSAPISASLBindRequests")
+ public void testQOP(GSSAPISASLBindRequest request) throws Exception
+ {
+ GSSAPISASLBindRequest.QOPOption [] options =
+ new GSSAPISASLBindRequest.QOPOption[]{
+ GSSAPISASLBindRequest.QOPOption.AUTH,
+ GSSAPISASLBindRequest.QOPOption.AUTH_INT,
+ GSSAPISASLBindRequest.QOPOption.AUTH_CONF};
+ request.setQOP(options);
+ assertTrue(Arrays.deepEquals(options, request.getQOP()));
+ }
+
+ @Test(dataProvider = "GSSAPISASLBindRequests")
+ public void testServerAuth(GSSAPISASLBindRequest request) throws Exception
+ {
+ request.setServerAuth(true);
+ assertEquals(request.getServerAuth(), true);
+ }
+
+ @Test(dataProvider = "GSSAPISASLBindRequests")
+ public void testSendBuffer(GSSAPISASLBindRequest request) throws Exception
+ {
+ request.setMaxSendBufferSize(512);
+ assertEquals(request.getMaxSendBufferSize(), 512);
+ }
+
+ @Test(dataProvider = "GSSAPISASLBindRequests")
+ public void testRecieveBuffer(GSSAPISASLBindRequest request) throws Exception
+ {
+ request.setMaxReceiveBufferSize(512);
+ assertEquals(request.getMaxReceiveBufferSize(), 512);
+ }
}
--
Gitblit v1.10.0