Package com.gargoylesoftware.htmlunit

Examples of com.gargoylesoftware.htmlunit.WebResponse


        artifactFile.getParentFile().mkdirs();

        FileUtils.writeStringToFile( artifactFile, expectedArtifactContents, Charset.defaultCharset()  );

        //WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/internal/" + commonsLangJar );
        WebResponse response = getWebResponse( "/repository/internal/" + commonsLangJar );
        assertResponseOK( response );

        assertEquals( "Expected file contents", expectedArtifactContents, response.getContentAsString() );
    }
View Full Code Here


        FileUtils.writeStringToFile( artifactFile, expectedArtifactContents, Charset.defaultCharset()  );

        //WebRequest request = new GetMethodWebRequest(
        //    "http://machine.com/repository/internal/" + "commons-lang/jars/commons-lang-2.1-SNAPSHOT.jar" );
        WebResponse response = getWebResponse( "/repository/internal/commons-lang/jars/commons-lang-2.1-SNAPSHOT.jar" );
        assertResponseOK( response );

        assertEquals( "Expected file contents", expectedArtifactContents, response.getContentAsString() );
    }
View Full Code Here

        artifactFile.getParentFile().mkdirs();

        FileUtils.writeStringToFile( artifactFile, expectedArtifactContents, Charset.defaultCharset()  );

        //WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/internal/" + commonsLangJar );
        WebResponse response = getWebResponse( "/repository/internal/" + commonsLangJar );
        assertResponseOK( response );

        assertEquals( "Expected file contents", expectedArtifactContents, response.getContentAsString() );
    }
View Full Code Here

        FileUtils.writeStringToFile( artifactFile, expectedArtifactContents, Charset.defaultCharset()  );

        WebRequest request = new GetMethodWebRequest(
            "http://machine.com/repository/internal/" + "commons-lang/jars/commons-lang-2.1-20050821.023400-1.jar" );
        WebResponse response = getServletUnitClient().getResponse( request );
        assertResponseOK( response );

        assertEquals( "Expected file contents", expectedArtifactContents, response.getContentAsString() );
    }
View Full Code Here

        checksumFile.getParentFile().mkdirs();

        FileUtils.writeStringToFile( checksumFile, expectedContents, Charset.defaultCharset()  );

        WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/internal/" + dualExtensionPath );
        WebResponse response = getServletUnitClient().getResponse( request );
        assertResponseOK( response );

        assertEquals( "Expected file contents", expectedContents, response.getContentAsString() );
    }
View Full Code Here

        FileUtils.writeStringToFile( checksumFile, expectedContents, Charset.defaultCharset()  );

        WebRequest request = new GetMethodWebRequest(
            "http://machine.com/repository/internal/" + "org.project/distributions/example-presentation-3.2.zip" );
        WebResponse response = getServletUnitClient().getResponse( request );
        assertResponseOK( response );

        assertEquals( "Expected file contents", expectedContents, response.getContentAsString() );
    }
View Full Code Here

        checksumFile.getParentFile().mkdirs();

        FileUtils.writeStringToFile( checksumFile, "dummy-checksum", Charset.defaultCharset()  );

        WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/legacy/" + commonsLangSha1 );
        WebResponse response = getServletUnitClient().getResponse( request );
        assertResponseOK( response );

        assertEquals( "Expected file contents", "dummy-checksum", response.getContentAsString() );
    }
View Full Code Here

        checksumFile.getParentFile().mkdirs();

        FileUtils.writeStringToFile( checksumFile, "dummy-checksum", Charset.defaultCharset()  );

        WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/legacy/" + commonsLangSha1 );
        WebResponse response = getServletUnitClient().getResponse( request );
        assertResponseOK( response );

        assertEquals( "Expected file contents", "dummy-checksum", response.getContentAsString() );
    }
View Full Code Here

        metadataFile.getParentFile().mkdirs();

        FileUtils.writeStringToFile( metadataFile, expectedMetadataContents, Charset.defaultCharset()  );

        WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/legacy/" + commonsLangMetadata );
        WebResponse response = getServletUnitClient().getResponse( request );
        assertResponseOK( response );

        assertEquals( "Expected file contents", expectedMetadataContents, response.getContentAsString() );
    }
View Full Code Here

        metadataFile.getParentFile().mkdirs();

        FileUtils.writeStringToFile( metadataFile, expectedMetadataContents, Charset.defaultCharset()  );

        WebRequest request = new GetMethodWebRequest( "http://machine.com/repository/legacy/" + commonsLangMetadata );
        WebResponse response = getServletUnitClient().getResponse( request );
        assertResponseOK( response );

        assertEquals( "Expected file contents", expectedMetadataContents, response.getContentAsString() );
    }
View Full Code Here

TOP

Related Classes of com.gargoylesoftware.htmlunit.WebResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.