File tree Expand file tree Collapse file tree
src/test/java/com/github/greengerong Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package com .github .greengerong ;
22
3+ import org .apache .http .impl .client .CloseableHttpClient ;
34import org .junit .Test ;
45
56import java .util .HashMap ;
67import java .util .Map ;
78
9+ import static org .hamcrest .core .Is .is ;
10+ import static org .hamcrest .core .IsNull .notNullValue ;
11+ import static org .junit .Assert .assertThat ;
12+
813public class PrerenderConfigTest {
9- @ Test (expected = NumberFormatException .class )
14+ @ Test (expected = Exception .class )
1015 public void should_throw_exception_if_invalid_timeout_value_specified () throws Exception {
1116 //given
1217 Map <String , String > configuration = new HashMap <String , String >();
@@ -23,6 +28,8 @@ public void should_pass_if_correct_timeout_value_specified() throws Exception {
2328 configuration .put ("socketTimeout" , "1000" );
2429 PrerenderConfig config = new PrerenderConfig (configuration );
2530 //when
26- config .getHttpClient ();
31+ final CloseableHttpClient httpClient = config .getHttpClient ();
32+
33+ assertThat (httpClient , is (notNullValue ()));
2734 }
2835}
You can’t perform that action at this time.
0 commit comments