public class AuthenticatingConnectionTest extends Object
AuthenticatingConnection.| Modifier and Type | Field and Description |
|---|---|
static Document |
EMPTY_DOC
An empty document for use in constructing messages.
|
static String |
TEST_DB
The database name used for testing.
|
| Constructor and Description |
|---|
AuthenticatingConnectionTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
setUp()
Creates the basic authenticate messages.
|
void |
tearDown()
Cleans up the test.
|
void |
testAuthenticateFails()
|
void |
testAuthenticateFailsNonNumericOk()
|
void |
testAuthenticateFailsNoNonceInReplyDoc()
|
void |
testAuthenticateFailsNoNonceReplyDoc()
|
void |
testAuthenticateReplyException()
|
void |
testAuthenticateRequestFails()
|
void |
testAuthWithMultipleCredentials()
|
void |
testAuthWithMultipleCredentialsFailures()
|
void |
testNoAuthenticateDoc()
|
void |
testNoAuthenticateOkDoc()
|
void |
testNonceFails()
|
void |
testPasswordHash()
Deprecated.
|
void |
testSendAdminMessageArrayAsNonAdmin()
|
void |
testSendCallbackOfReplyMessageArray()
Test method for
AuthenticatingConnection.send(Message, ReplyCallback) . |
void |
testSendMessage2()
|
void |
testSendMessageArray()
|
void |
testSendMessageArrayAsAdmin()
|
void |
testSendOnlyAuthenticateOnce()
|
void |
testToString()
Test method for
AuthenticatingConnection.toString(). |
public static final Document EMPTY_DOC
public static final String TEST_DB
public void setUp()
public void tearDown()
public void testAuthenticateFails()
throws IOException
AuthenticatingConnection.send(com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.callback.ReplyCallback) .IOException - On a failure setting up the mocks for the test.public void testAuthenticateFailsNonNumericOk()
throws IOException
AuthenticatingConnection.send(com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.callback.ReplyCallback) .IOException - On a failure setting up the mocks for the test.public void testAuthenticateFailsNoNonceInReplyDoc()
throws IOException
AuthenticatingConnection.send(com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.callback.ReplyCallback) .IOException - On a failure setting up the mocks for the test.public void testAuthenticateFailsNoNonceReplyDoc()
throws IOException
AuthenticatingConnection.send(com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.callback.ReplyCallback) .IOException - On a failure setting up the mocks for the test.public void testAuthenticateReplyException()
throws IOException
AuthenticatingConnection.send(com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.callback.ReplyCallback) .IOException - On a failure setting up the mocks for the test.public void testAuthenticateRequestFails()
throws IOException
AuthenticatingConnection.send(com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.callback.ReplyCallback) .IOException - On a failure setting up the mocks for the test.public void testAuthWithMultipleCredentials()
throws IOException
AuthenticatingConnection.send(com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.callback.ReplyCallback) .IOException - On a failure setting up the mocks for the test.public void testAuthWithMultipleCredentialsFailures()
throws IOException
AuthenticatingConnection.send(com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.callback.ReplyCallback) .IOException - On a failure setting up the mocks for the test.public void testNoAuthenticateDoc()
throws IOException
AuthenticatingConnection.send(com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.callback.ReplyCallback) .IOException - On a failure setting up the mocks for the test.public void testNoAuthenticateOkDoc()
throws IOException
AuthenticatingConnection.send(com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.callback.ReplyCallback) .IOException - On a failure setting up the mocks for the test.public void testNonceFails()
throws IOException
AuthenticatingConnection.send(com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.callback.ReplyCallback) .IOException - On a failure setting up the mocks for the test.@Deprecated public void testPasswordHash() throws NoSuchAlgorithmException
NoSuchAlgorithmException - On a failure.public void testSendAdminMessageArrayAsNonAdmin()
throws IOException
AuthenticatingConnection.send(com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.callback.ReplyCallback) .IOException - On a failure setting up the mocks for the test.public void testSendCallbackOfReplyMessageArray()
throws IOException
AuthenticatingConnection.send(Message, ReplyCallback) .IOException - On a failure setting up the mocks for the test.public void testSendMessage2()
throws IOException
AuthenticatingConnection.send(com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.callback.ReplyCallback) .IOException - On a failure setting up the mocks for the test.public void testSendMessageArray()
throws IOException
AuthenticatingConnection.send(com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.callback.ReplyCallback) .IOException - On a failure setting up the mocks for the test.public void testSendMessageArrayAsAdmin()
throws IOException
AuthenticatingConnection.send(com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.callback.ReplyCallback) .IOException - On a failure setting up the mocks for the test.public void testSendOnlyAuthenticateOnce()
throws IOException
AuthenticatingConnection.send(com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.Message, com.allanbank.mongodb.client.callback.ReplyCallback) .IOException - On a failure setting up the mocks for the test.public void testToString()
throws IOException
AuthenticatingConnection.toString().IOException - On a failure setting up the mocks for the test.Copyright © 2011–2014 Allanbank Consulting, Inc.. All rights reserved.