// --- Execution
// process the response code later, not via an exception.
//HttpUnitOptions.setExceptionsThrownOnErrorStatus( false );
WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/internal/" + resourcePath );
WebResponse response = getServletUnitClient().getResponse( request );
// --- Verification
switch ( expectation )
{
case EXPECT_MANAGED_CONTENTS:
assertResponseOK( response );
assertTrue( "Invalid Test Case: Can't expect managed contents with "
+ "test that doesn't have a managed copy in the first place.", hasManagedCopy );
assertEquals( "Expected managed file contents", expectedManagedContents, response.getContentAsString() );
break;
case EXPECT_REMOTE_CONTENTS:
assertResponseOK( response );
assertEquals( "Expected remote file contents", expectedRemoteContents, response.getContentAsString() );
break;
case EXPECT_NOT_FOUND:
assertResponseNotFound( response );
assertManagedFileNotExists( repoRootInternal, resourcePath );
break;