org.fcrepo.test.api
Class TestHTTPStatusCodes
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.custommonkey.xmlunit.XMLTestCase
org.fcrepo.test.FedoraTestCase
org.fcrepo.test.FedoraServerTestCase
org.fcrepo.test.api.TestHTTPStatusCodes
- All Implemented Interfaces:
- junit.framework.Test, org.custommonkey.xmlunit.XMLConstants, org.custommonkey.xmlunit.XSLTConstants, Constants, FedoraTestConstants
public class TestHTTPStatusCodes
- extends FedoraServerTestCase
Common tests for correct/incorrect http status codes with api requests over
API-A/API-M Lite. For non-200 requests, this also tests the response body for
the string "Fedora: # " (where # is the status code) to ensure that the
correct jsp has been delivered.
- Author:
- Chris Wilper
| Fields inherited from interface org.fcrepo.common.Constants |
ACCESS, ACTION, API, ATOM_APIM1_0, ATOM_ZIP1_1, ATOM1_1, AUDIT, AUDIT1_0, BATCH_MODIFY, BATCH_MODIFY1_1, BE_SECURITY, BE_SECURITY1_0, BINDING_SPEC, DATASTREAM, DC, DISSEMINATOR, DS_COMPOSITE_MODEL, DS_COMPOSITE_MODEL1_0, DS_INPUT_SPEC1_0, DS_INPUT_SPEC1_1, ENVIRONMENT, FCFG, FEDORA, FEDORA_APP_CONTEXT_NAME, FEDORA_DEFAULT_APP_CONTEXT, FEDORA_HOME, FEDORA_REPOSITORY_PID, FOXML, FOXML1_0, FOXML1_0_LEGACY, FOXML1_1, HTTP_REQUEST, MANAGEMENT, METHOD_MAP, METS, METS_EXT, METS_EXT1_0, METS_EXT1_0_LEGACY, METS_EXT1_1, MODEL, MULGARA, OAI_DC, OAI_DC2_0, OAI_FRIENDS, OAI_FRIENDS2_0, OAI_IDENTIFIER, OAI_IDENTIFIER2_0, OAI_PMH, OAI_PMH2_0, OAI_PROV, OAI_PROV2_0, OBJ_DATASTREAMS1_0, OBJ_HISTORY1_0, OBJ_ITEMS1_0, OBJ_METHODS1_0, OBJ_PROFILE1_0, OBJ_VALIDATION1_0, OBJECT, OLD_XLINK, PID_LIST1_0, RDF, RDF_XSD, RECOVERY, RELS_EXT, RELS_EXT1_0, RELS_INT1_0, REPO_DESC1_0, RESOURCE, SDEF, SDEF_METHOD_MAP1_0, SDEP, SDEP_METHOD_MAP1_0, SDEP_METHOD_MAP1_1, SERVICE_PROFILE, SOAP, SOAP_ENC, SUBJECT, TYPES, VIEW, WSDL, WSDL_HTTP, WSDL_MIME, XACML_POLICY, XACML_POLICY1_0, XACML1, XACML1_ACTION, XACML1_POLICY, XACML1_RESOURCE, XACML1_SUBJECT, XACML2_POLICY_SCHEMA, XLINK, XML_XSD, XMLNS, XSI |
| Fields inherited from interface org.fcrepo.common.FedoraTestConstants |
BESECURITY, DEMO_DIR_PREFIX, FCFG, FEDORA_HOME_CLIENT, FEDORA_HOME_CLIENT_BIN, FEDORA_HOME_SERVER, FEDORA_HOME_SERVER_CONFIG, FEDORA_PASSWORD, FEDORA_USERNAME, NS_FCFG, NS_FEDORA_TYPES, NS_FEDORA_TYPES_PREFIX |
| Fields inherited from interface org.custommonkey.xmlunit.XSLTConstants |
JAVA5_XSLTC_FACTORY_NAME, XSLT_END, XSLT_IDENTITY_TEMPLATE, XSLT_START, XSLT_START_NO_VERSION, XSLT_STRIP_COMMENTS_TEMPLATE, XSLT_STRIP_WHITESPACE, XSLT_XML_OUTPUT_NOINDENT |
| Fields inherited from interface org.custommonkey.xmlunit.XMLConstants |
CLOSE_NODE, END_CDATA, END_COMMENT, END_PROCESSING_INSTRUCTION, OPEN_END_NODE, OPEN_START_NODE, START_CDATA, START_COMMENT, START_DOCTYPE, START_PROCESSING_INSTRUCTION, W3C_XML_SCHEMA_INSTANCE_NO_NAMESPACE_SCHEMA_LOCATION_ATTR, W3C_XML_SCHEMA_INSTANCE_NS_URI, W3C_XML_SCHEMA_INSTANCE_SCHEMA_LOCATION_ATTR, W3C_XML_SCHEMA_NS_URI, XML_DECLARATION, XMLNS_PREFIX, XPATH_ATTRIBUTE_IDENTIFIER, XPATH_CHARACTER_NODE_IDENTIFIER, XPATH_COMMENT_IDENTIFIER, XPATH_NODE_INDEX_END, XPATH_NODE_INDEX_START, XPATH_PROCESSING_INSTRUCTION_IDENTIFIER, XPATH_SEPARATOR |
| Methods inherited from class org.fcrepo.test.FedoraServerTestCase |
getDemoObjects, getXMLQueryResult, getXMLQueryResult, ingestDemoObjects, ingestDemoObjects, ingestDemoObjects, ingestDemoObjects, main, purgeDemoObjects, purgeDemoObjects, testingAtom, testingAtomZip, testingMETS |
| Methods inherited from class org.fcrepo.test.FedoraTestCase |
getBaseURL, getDemoAppServerContext, getDemoBaseURL, getFedoraAppServerContext, getFedoraClient, getFedoraClient, getHost, getPassword, getPort, getProtocol, getServerConfiguration, getUsername |
| Methods inherited from class org.custommonkey.xmlunit.XMLTestCase |
assertNodeTestPasses, assertNodeTestPasses, assertNodeTestPasses, assertXMLEqual, assertXMLEqual, assertXMLEqual, assertXMLEqual, assertXMLEqual, assertXMLEqual, assertXMLEqual, assertXMLEqual, assertXMLEqual, assertXMLEqual, assertXMLIdentical, assertXMLIdentical, assertXMLNotEqual, assertXMLNotEqual, assertXMLNotEqual, assertXMLNotEqual, assertXMLNotEqual, assertXMLNotEqual, assertXMLNotEqual, assertXMLNotEqual, assertXMLValid, assertXMLValid, assertXMLValid, assertXMLValid, assertXMLValid, assertXMLValid, assertXMLValid, assertXpathEvaluatesTo, assertXpathEvaluatesTo, assertXpathEvaluatesTo, assertXpathExists, assertXpathExists, assertXpathExists, assertXpathNotExists, assertXpathNotExists, assertXpathNotExists, assertXpathsEqual, assertXpathsEqual, assertXpathsEqual, assertXpathsEqual, assertXpathsEqual, assertXpathsEqual, assertXpathsNotEqual, assertXpathsNotEqual, assertXpathsNotEqual, assertXpathsNotEqual, assertXpathsNotEqual, assertXpathsNotEqual, assertXpathValuesEqual, assertXpathValuesEqual, assertXpathValuesEqual, assertXpathValuesEqual, assertXpathValuesEqual, assertXpathValuesEqual, assertXpathValuesNotEqual, assertXpathValuesNotEqual, assertXpathValuesNotEqual, assertXpathValuesNotEqual, assertXpathValuesNotEqual, assertXpathValuesNotEqual, compareXML, compareXML, compareXML, compareXML, compareXML, compareXML |
| Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, 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 |
TEST_OBJ
public static final String TEST_OBJ
- See Also:
- Constant Field Values
BOGUS_DS
public static final String BOGUS_DS
- See Also:
- Constant Field Values
BOGUS_METHOD
public static final String BOGUS_METHOD
- See Also:
- Constant Field Values
BOGUS_OBJ
public static final String BOGUS_OBJ
- See Also:
- Constant Field Values
BOGUS_SDEF
public static final String BOGUS_SDEF
- See Also:
- Constant Field Values
GET_NEXT_PID_PATH
public static final String GET_NEXT_PID_PATH
- See Also:
- Constant Field Values
DESCRIBE_REPOSITORY_PATH
public static final String DESCRIBE_REPOSITORY_PATH
- See Also:
- Constant Field Values
GET_DS_DISSEM_PATH
public static final String GET_DS_DISSEM_PATH
- See Also:
- Constant Field Values
GET_DS_DISSEM_BOGUS_DS_PATH
public static final String GET_DS_DISSEM_BOGUS_DS_PATH
- See Also:
- Constant Field Values
GET_DS_DISSEM_BOGUS_OBJ_PATH
public static final String GET_DS_DISSEM_BOGUS_OBJ_PATH
- See Also:
- Constant Field Values
GET_DEFAULT_DISSEM_PATH
public static final String GET_DEFAULT_DISSEM_PATH
- See Also:
- Constant Field Values
GET_DEFAULT_DISSEM_BOGUS_METHOD_PATH
public static final String GET_DEFAULT_DISSEM_BOGUS_METHOD_PATH
- See Also:
- Constant Field Values
GET_DEFAULT_DISSEM_BOGUS_OBJ_PATH
public static final String GET_DEFAULT_DISSEM_BOGUS_OBJ_PATH
- See Also:
- Constant Field Values
GET_CUSTOM_DISSEM_PATH
public static final String GET_CUSTOM_DISSEM_PATH
- See Also:
- Constant Field Values
GET_CUSTOM_DISSEM_BOGUS_METHOD_PATH
public static final String GET_CUSTOM_DISSEM_BOGUS_METHOD_PATH
- See Also:
- Constant Field Values
GET_CUSTOM_DISSEM_BOGUS_SDEF_PATH
public static final String GET_CUSTOM_DISSEM_BOGUS_SDEF_PATH
- See Also:
- Constant Field Values
GET_CUSTOM_DISSEM_BOGUS_OBJ_PATH
public static final String GET_CUSTOM_DISSEM_BOGUS_OBJ_PATH
- See Also:
- Constant Field Values
GET_OBJ_HISTORY_PATH
public static final String GET_OBJ_HISTORY_PATH
- See Also:
- Constant Field Values
GET_OBJ_HISTORY_BOGUS_OBJ_PATH
public static final String GET_OBJ_HISTORY_BOGUS_OBJ_PATH
- See Also:
- Constant Field Values
GET_OBJ_PROFILE_PATH
public static final String GET_OBJ_PROFILE_PATH
- See Also:
- Constant Field Values
GET_OBJ_PROFILE_BOGUS_OBJ_PATH
public static final String GET_OBJ_PROFILE_BOGUS_OBJ_PATH
- See Also:
- Constant Field Values
LIST_DATASTREAMS_PATH
public static final String LIST_DATASTREAMS_PATH
- See Also:
- Constant Field Values
LIST_DATASTREAMS_BOGUS_OBJ_PATH
public static final String LIST_DATASTREAMS_BOGUS_OBJ_PATH
- See Also:
- Constant Field Values
LIST_METHODS_PATH
public static final String LIST_METHODS_PATH
- See Also:
- Constant Field Values
LIST_METHODS_BOGUS_OBJ_PATH
public static final String LIST_METHODS_BOGUS_OBJ_PATH
- See Also:
- Constant Field Values
FIND_OBJECTS_PATH
public static final String FIND_OBJECTS_PATH
- See Also:
- Constant Field Values
FIND_OBJECTS_BADREQ_PATH
public static final String FIND_OBJECTS_BADREQ_PATH
- See Also:
- Constant Field Values
RI_SEARCH_PATH
public static final String RI_SEARCH_PATH
- See Also:
- Constant Field Values
TestHTTPStatusCodes
public TestHTTPStatusCodes()
suite
public static junit.framework.Test suite()
checkOK
public static void checkOK(String requestPath)
throws Exception
- Throws:
Exception
checkError
public static void checkError(String requestPath)
throws Exception
- Throws:
Exception
checkBadAuthN
public static void checkBadAuthN(String requestPath)
throws Exception
- Throws:
Exception
checkBadAuthZ
public static void checkBadAuthZ(String requestPath)
throws Exception
- Throws:
Exception
checkNotFound
public static void checkNotFound(String requestPath)
throws Exception
- Throws:
Exception
checkBadRequest
public static void checkBadRequest(String requestPath)
throws Exception
- Throws:
Exception
testGetNextPID_OK
public void testGetNextPID_OK()
throws Exception
- Throws:
Exception
testGetNextPID_BadAuthN
public void testGetNextPID_BadAuthN()
throws Exception
- Throws:
Exception
testGetNextPID_BadAuthZ
public void testGetNextPID_BadAuthZ()
throws Exception
- Throws:
Exception
testUpload_Created
public void testUpload_Created()
throws Exception
- Throws:
Exception
testUpload_BadAuthN
public void testUpload_BadAuthN()
throws Exception
- Throws:
Exception
testUpload_BadRequest
public void testUpload_BadRequest()
throws Exception
- Throws:
Exception
testDescribeRepository_OK
public void testDescribeRepository_OK()
throws Exception
- Throws:
Exception
testGetDatastreamDissemination_OK
public void testGetDatastreamDissemination_OK()
throws Exception
- Throws:
Exception
testGetDatastreamDissemination_Datastream_NotFound
public void testGetDatastreamDissemination_Datastream_NotFound()
throws Exception
- Throws:
Exception
testGetDatastreamDissemination_Object_NotFound
public void testGetDatastreamDissemination_Object_NotFound()
throws Exception
- Throws:
Exception
testGetDissemination_Default_OK
public void testGetDissemination_Default_OK()
throws Exception
- Throws:
Exception
testGetDissemination_Default_Method_NotFound
public void testGetDissemination_Default_Method_NotFound()
throws Exception
- Throws:
Exception
testGetDissemination_Default_Object_NotFound
public void testGetDissemination_Default_Object_NotFound()
throws Exception
- Throws:
Exception
testGetDissemination_Custom_OK
public void testGetDissemination_Custom_OK()
throws Exception
- Throws:
Exception
testGetDissemination_Custom_Method_NotFound
public void testGetDissemination_Custom_Method_NotFound()
throws Exception
- Throws:
Exception
testGetDissemination_Custom_Object_NotFound
public void testGetDissemination_Custom_Object_NotFound()
throws Exception
- Throws:
Exception
testGetObjectHistory_OK
public void testGetObjectHistory_OK()
throws Exception
- Throws:
Exception
testGetObjectHistory_Object_NotFound
public void testGetObjectHistory_Object_NotFound()
throws Exception
- Throws:
Exception
testGetObjectProfile_OK
public void testGetObjectProfile_OK()
throws Exception
- Throws:
Exception
testGetObjectProfile_Object_NotFound
public void testGetObjectProfile_Object_NotFound()
throws Exception
- Throws:
Exception
testListDatastreams_OK
public void testListDatastreams_OK()
throws Exception
- Throws:
Exception
testListDatastreams_Object_NotFound
public void testListDatastreams_Object_NotFound()
throws Exception
- Throws:
Exception
testListMethods_OK
public void testListMethods_OK()
throws Exception
- Throws:
Exception
testListMethods_Object_NotFound
public void testListMethods_Object_NotFound()
throws Exception
- Throws:
Exception
testFindObjects_OK
public void testFindObjects_OK()
throws Exception
- Throws:
Exception
testFindObjects_BadRequest
public void testFindObjects_BadRequest()
throws Exception
- Throws:
Exception
Copyright © 2012 DuraSpace. All Rights Reserved.