Esempio n. 1
0
 @Test
 public void returnAMockOfTheInstanceUnderConstructionIfTheBuildMethodIsCalled() throws Exception {
   assertThat(mockedBuilder.build(), instanceOf(ObjectUnderConstruction.class));
 }
Esempio n. 2
0
 @Test
 public void ifAMethodIsCalledOnTheMockOfTheBuilderItReturnsTheMock() throws Exception {
   assertThat(mockedBuilder.collectDetail("detail"), is(mockedBuilder));
 }