* Client builder fails to build with no auth specified
*/
try {
new ClientBuilder()
.hosts(new HttpHosts(Constants.STREAM_HOST))
.endpoint(new StatusesSampleEndpoint())
.processor(new NullProcessor())
.build();
fail();
} catch (Exception e) {
// expected
}
/**
* Client builder fails to build with no host specified
*/
try {
new ClientBuilder()
.endpoint(new StatusesSampleEndpoint())
.processor(new NullProcessor())
.authentication(new BasicAuth("username", "password"))
.build();
fail();
} catch (Exception e) {
// expected
}
/**
* Client builder fails to build with no endpoint specified
*/
try {
new ClientBuilder()
.hosts(new HttpHosts(Constants.STREAM_HOST))
.processor(new NullProcessor())
.authentication(new BasicAuth("username", "password"))
.build();
fail();
} catch (Exception e) {
// expected
}
/**
* Client builder fails to build with no processor specified
*/
try {
new ClientBuilder()
.hosts(new HttpHosts(Constants.STREAM_HOST))
.endpoint(new StatusesSampleEndpoint())
.authentication(new BasicAuth("username", "password"))
.build();
fail();
} catch (Exception e) {
// expected