Exemplo n.º 1
0
  @Test
  public void shouldReturnCorrectMessageIfSuperNodesConfiguredSuccessfully() {
    // act
    String result = controller.configureSuperNodes(SUPERNODE_APP, 4, 0);

    // assert
    verify(superNodeSeeder).configureNumberOfSuperNodes(SUPERNODE_APP, 4, 0);
    assertThat(result, is(String.format("Application (%s) configured", SUPERNODE_APP)));
  }
Exemplo n.º 2
0
 @Test(expected = IllegalArgumentException.class)
 public void shouldThrowIllegalArgumentExceptionIfOffsetIsNegative() {
   // act
   controller.configureSuperNodes(SUPERNODE_APP, 2, -1);
 }
Exemplo n.º 3
0
 @Test(expected = IllegalArgumentException.class)
 public void shouldThrowIllegalArgumentExceptionIfApplicationNameIsNotProvided() {
   // act
   controller.configureSuperNodes("", 4, 0);
 }