com.atlassian.crowd.acceptance.tests.clientlib.atlassianuser
Class CrowdEntityQueryParserTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by com.atlassian.crowd.acceptance.utils.CrowdWebTestCase
              extended by com.atlassian.crowd.acceptance.tests.console.CrowdAcceptanceTestCase
                  extended by com.atlassian.crowd.acceptance.tests.clientlib.atlassianuser.CrowdEntityQueryParserTest
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
CrowdEntityQueryParserInternalDirectoryTest, CrowdEntityQueryParserLDAPTest

public abstract class CrowdEntityQueryParserTest
extends CrowdAcceptanceTestCase


Field Summary
static java.lang.String ADMIN
           
static java.lang.String ALICE
           
static java.lang.String BOB
           
static java.lang.String CONF_ADMIN_GROUP
           
static java.lang.String CONF_USER_GROUP
           
static java.lang.String CONFADMIN
           
static java.lang.String CROWD_ADMIN_GROUP
           
protected static CrowdEntityQueryParser queryParser
           
static java.lang.String SHIHAB
           
 
Fields inherited from class com.atlassian.crowd.acceptance.tests.console.CrowdAcceptanceTestCase
ADMIN_EMAIL, ADMIN_FULL_NAME, ADMIN_GROUP, ADMIN_PW, ADMIN_USER, CONSOLE_PORT, CONTEXT_PATH, EXPIRED_MAINTENANCE_KEY, HOST, HOST_PATH, logger, specProperties, UNLIMITED_LICENSE_KEY, URL_HOME, WAR_PATH, WORKGROUP_LICENSE_KEY
 
Fields inherited from class com.atlassian.crowd.acceptance.utils.CrowdWebTestCase
tester
 
Constructor Summary
CrowdEntityQueryParserTest()
           
 
Method Summary
protected  void assertNoResults(com.atlassian.user.search.SearchResult result)
           
protected  void assertResultConsistsOf(com.atlassian.user.search.SearchResult result, java.lang.String... names)
           
protected  void assertResultContains(com.atlassian.user.search.SearchResult result, java.lang.String... names)
           
protected  void assertResultContains(com.atlassian.user.search.SearchResult result, java.lang.String name)
           
protected abstract  boolean hasBeenSetUpOnce()
          Test implementations should return true if setup has already occured once.
 void setUp()
           
protected  void setUpOnce()
          Test implementations should extend this method to set up test data in the directory.
 void testSearchAllUsers()
           
 void testSearchEmail_manyMatches()
           
 void testSearchEmail_noMatch()
           
 void testSearchEmail_oneMatch()
           
 void testSearchFullname_manyMatches()
           
 void testSearchFullname_noMatch()
           
 void testSearchFullname_oneMatch()
           
 void testSearchGroups_allGroups()
           
 void testSearchGroups_manyMatches()
           
 void testSearchGroups_noMatches()
           
 void testSearchGroups_oneMatch()
           
 void testSearchUsername_manyMatches()
           
 void testSearchUsername_noMatch()
           
 void testSearchUsername_oneMatch()
           
 void testSearchUsernameAndEmailAndFullname_manyMatches()
           
 void testSearchUsernameAndEmailAndFullname_noMatch()
           
 void testSearchUsernameAndEmailAndFullname_oneMatch()
           
 void testSearchUsernameOrEmailOrFullname_manyMatches()
           
 void testSearchUsernameOrEmailOrFullname_noMatches()
           
 void testSearchUsernameOrEmailOrFullname_oneMatch()
           
 
Methods inherited from class com.atlassian.crowd.acceptance.tests.console.CrowdAcceptanceTestCase
_getTestProperty, _loginAdminUser, _logout, addRole, getBaseUrl, getCrowdContext, getCrowdHome, getText, gotoAddApplication, gotoAddGroup, gotoAddPrincipal, gotoAddRole, gotoBrowseApplications, gotoBrowseDirectories, gotoBrowseGroups, gotoBrowseGroups, gotoBrowsePrincipals, gotoBrowsePrincipals, gotoBrowseRoles, gotoCreateDirectory, gotoCurrentApplicationSessions, gotoCurrentPrincipalSessions, gotoGeneral, gotoImporters, gotoLicensing, gotoLoggingProfiling, gotoMailServer, gotoMailTemplate, gotoRestore, gotoSAMLConfig, gotoSessionConfig, gotoTrustedProxies, gotoViewApplication, gotoViewGroup, gotoViewPrincipal, gotoViewRole, log, restoreBaseSetup, restoreCrowdFromXML, tearDown
 
Methods inherited from class com.atlassian.crowd.acceptance.utils.CrowdWebTestCase
addRequestHeader, assertButtonNotPresent, assertButtonNotPresentWithText, assertButtonPresent, assertButtonPresentWithText, assertCheckboxNotPresent, assertCheckboxNotPresent, assertCheckboxNotSelected, assertCheckboxNotSelected, assertCheckboxPresent, assertCheckboxPresent, assertCheckboxSelected, assertCheckboxSelected, assertCookiePresent, assertCookieValueEquals, assertCookieValueMatch, assertDownloadedFileEquals, assertElementNotPresent, assertElementNotPresentByXPath, assertElementPresent, assertElementPresentByXPath, assertErrorNotPresent, assertErrorPresent, assertErrorPresentWithKey, assertErrorPresentWithText, assertFormElementEmpty, assertFormElementEquals, assertFormElementMatch, assertFormElementNotPresent, assertFormElementPresent, assertFormNotPresent, assertFormNotPresent, assertFormPresent, assertFormPresent, assertFramePresent, assertHiddenFieldPresent, assertKeyInTable, assertKeyNotInTable, assertKeyNotPresent, assertKeyPresent, assertKeyPresent, assertKeysInTable, assertLinkNotPresent, assertLinkNotPresentWithExactText, assertLinkNotPresentWithExactText, assertLinkNotPresentWithImage, assertLinkNotPresentWithText, assertLinkNotPresentWithText, assertLinkPresent, assertLinkPresentWithExactText, assertLinkPresentWithExactText, assertLinkPresentWithImage, assertLinkPresentWithKey, assertLinkPresentWithText, assertLinkPresentWithText, assertMatch, assertMatchInElement, assertMatchInTable, assertMatchInTable, assertNoMatch, assertNoMatchInElement, assertNoMatchInTable, assertNoMatchInTable, assertRadioOptionNotPresent, assertRadioOptionNotSelected, assertRadioOptionPresent, assertRadioOptionSelected, assertResetButtonNotPresent, assertResetButtonNotPresent, assertResetButtonPresent, assertResetButtonPresent, assertSelectedOptionEquals, assertSelectedOptionMatches, assertSelectedOptionsEqual, assertSelectedOptionsMatch, assertSelectedOptionValueEquals, assertSelectedOptionValuesEqual, assertSelectOptionNotPresent, assertSelectOptionPresent, assertSelectOptionsEqual, assertSelectOptionsNotEqual, assertSelectOptionsPresent, assertSelectOptionValueNotPresent, assertSelectOptionValuePresent, assertSelectOptionValuesEqual, assertSelectOptionValuesNotEqual, assertSelectOptionValuesPresent, assertServerResponseContains, assertServerResponseDoesNotContain, assertSubmitButtonNotPresent, assertSubmitButtonNotPresent, assertSubmitButtonPresent, assertSubmitButtonPresent, assertSubmitButtonPresent, assertTableEquals, assertTableEquals, assertTableMatch, assertTableMatch, assertTableNotPresent, assertTablePresent, assertTableRowCountEquals, assertTableRowsEqual, assertTableRowsEqual, assertTableRowsMatch, assertTableRowsMatch, assertTextFieldEquals, assertTextInElement, assertTextInTable, assertTextInTable, assertTextNotInElement, assertTextNotInTable, assertTextNotInTable, assertTextNotPresent, assertTextPresent, assertTitleEquals, assertTitleEqualsKey, assertTitleMatch, assertWarningAndErrorNotPresent, assertWarningNotPresent, assertWarningPresent, assertWarningPresentWithKey, assertWarningPresentWithText, assertWindowCountEquals, assertWindowPresent, assertWindowPresent, assertWindowPresentWithTitle, beginAt, checkCheckbox, checkCheckbox, clickButton, clickButtonWithText, clickElementByXPath, clickLink, clickLinkWithExactText, clickLinkWithExactText, clickLinkWithImage, clickLinkWithKey, clickLinkWithText, clickLinkWithText, clickRadioOption, closeBrowser, closeWindow, dumpCookies, dumpHtml, dumpHtml, dumpTable, dumpTable, getDialog, getElementAttributByXPath, getElementTextByXPath, getFormElementValue, getMessage, getPageSource, getServerResponse, getTable, getTestContext, getTester, getTestingEngineKey, gotoFrame, gotoPage, gotoRootWindow, gotoWindow, gotoWindow, gotoWindowByTitle, reset, runBare, saveAs, selectOption, selectOptionByValue, selectOptions, selectOptionsByValues, setDialog, setExpectedJavaScriptAlert, setExpectedJavaScriptAlert, setExpectedJavaScriptConfirm, setExpectedJavaScriptConfirm, setExpectedJavaScriptPrompt, setExpectedJavaScriptPrompt, setFormElement, setRadioButton, setScriptingEnabled, setTestContext, setTester, setTestingEngineKey, setTextField, setWorkingForm, setWorkingForm, setWorkingForm, submit, submit, submit, uncheckCheckbox, uncheckCheckbox
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

queryParser

protected static CrowdEntityQueryParser queryParser

ADMIN

public static final java.lang.String ADMIN
See Also:
Constant Field Values

ALICE

public static final java.lang.String ALICE
See Also:
Constant Field Values

BOB

public static final java.lang.String BOB
See Also:
Constant Field Values

CONFADMIN

public static final java.lang.String CONFADMIN
See Also:
Constant Field Values

SHIHAB

public static final java.lang.String SHIHAB
See Also:
Constant Field Values

CROWD_ADMIN_GROUP

public static final java.lang.String CROWD_ADMIN_GROUP
See Also:
Constant Field Values

CONF_USER_GROUP

public static final java.lang.String CONF_USER_GROUP
See Also:
Constant Field Values

CONF_ADMIN_GROUP

public static final java.lang.String CONF_ADMIN_GROUP
See Also:
Constant Field Values
Constructor Detail

CrowdEntityQueryParserTest

public CrowdEntityQueryParserTest()
Method Detail

setUp

public void setUp()
           throws java.lang.Exception
Overrides:
setUp in class CrowdAcceptanceTestCase
Throws:
java.lang.Exception

hasBeenSetUpOnce

protected abstract boolean hasBeenSetUpOnce()
Test implementations should return true if setup has already occured once. This results in text execution speed ups as the data is loaded only once.


setUpOnce

protected void setUpOnce()
                  throws java.lang.Exception
Test implementations should extend this method to set up test data in the directory.

Throws:
java.lang.Exception

testSearchAllUsers

public void testSearchAllUsers()
                        throws com.atlassian.user.EntityException
Throws:
com.atlassian.user.EntityException

testSearchUsername_manyMatches

public void testSearchUsername_manyMatches()
                                    throws com.atlassian.user.EntityException
Throws:
com.atlassian.user.EntityException

testSearchUsername_oneMatch

public void testSearchUsername_oneMatch()
                                 throws com.atlassian.user.EntityException
Throws:
com.atlassian.user.EntityException

testSearchUsername_noMatch

public void testSearchUsername_noMatch()
                                throws com.atlassian.user.EntityException
Throws:
com.atlassian.user.EntityException

testSearchEmail_oneMatch

public void testSearchEmail_oneMatch()
                              throws com.atlassian.user.EntityException
Throws:
com.atlassian.user.EntityException

testSearchEmail_manyMatches

public void testSearchEmail_manyMatches()
                                 throws com.atlassian.user.EntityException
Throws:
com.atlassian.user.EntityException

testSearchEmail_noMatch

public void testSearchEmail_noMatch()
                             throws com.atlassian.user.EntityException
Throws:
com.atlassian.user.EntityException

testSearchFullname_oneMatch

public void testSearchFullname_oneMatch()
                                 throws com.atlassian.user.EntityException
Throws:
com.atlassian.user.EntityException

testSearchFullname_manyMatches

public void testSearchFullname_manyMatches()
                                    throws com.atlassian.user.EntityException
Throws:
com.atlassian.user.EntityException

testSearchFullname_noMatch

public void testSearchFullname_noMatch()
                                throws com.atlassian.user.EntityException
Throws:
com.atlassian.user.EntityException

testSearchUsernameAndEmailAndFullname_oneMatch

public void testSearchUsernameAndEmailAndFullname_oneMatch()
                                                    throws com.atlassian.user.EntityException
Throws:
com.atlassian.user.EntityException

testSearchUsernameAndEmailAndFullname_manyMatches

public void testSearchUsernameAndEmailAndFullname_manyMatches()
                                                       throws com.atlassian.user.EntityException
Throws:
com.atlassian.user.EntityException

testSearchUsernameAndEmailAndFullname_noMatch

public void testSearchUsernameAndEmailAndFullname_noMatch()
                                                   throws com.atlassian.user.EntityException
Throws:
com.atlassian.user.EntityException

testSearchUsernameOrEmailOrFullname_oneMatch

public void testSearchUsernameOrEmailOrFullname_oneMatch()
                                                  throws com.atlassian.user.EntityException
Throws:
com.atlassian.user.EntityException

testSearchUsernameOrEmailOrFullname_manyMatches

public void testSearchUsernameOrEmailOrFullname_manyMatches()
                                                     throws com.atlassian.user.EntityException
Throws:
com.atlassian.user.EntityException

testSearchUsernameOrEmailOrFullname_noMatches

public void testSearchUsernameOrEmailOrFullname_noMatches()
                                                   throws com.atlassian.user.EntityException
Throws:
com.atlassian.user.EntityException

testSearchGroups_allGroups

public void testSearchGroups_allGroups()
                                throws com.atlassian.user.EntityException
Throws:
com.atlassian.user.EntityException

testSearchGroups_oneMatch

public void testSearchGroups_oneMatch()
                               throws com.atlassian.user.EntityException
Throws:
com.atlassian.user.EntityException

testSearchGroups_manyMatches

public void testSearchGroups_manyMatches()
                                  throws com.atlassian.user.EntityException
Throws:
com.atlassian.user.EntityException

testSearchGroups_noMatches

public void testSearchGroups_noMatches()
                                throws com.atlassian.user.EntityException
Throws:
com.atlassian.user.EntityException

assertNoResults

protected void assertNoResults(com.atlassian.user.search.SearchResult result)

assertResultContains

protected void assertResultContains(com.atlassian.user.search.SearchResult result,
                                    java.lang.String name)

assertResultContains

protected void assertResultContains(com.atlassian.user.search.SearchResult result,
                                    java.lang.String... names)

assertResultConsistsOf

protected void assertResultConsistsOf(com.atlassian.user.search.SearchResult result,
                                      java.lang.String... names)


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.