示例#1
0
  @Test
  public void shouldCreatePathWithData() throws Exception {
    // Given
    createCommand.data = "node data";

    // When
    createCommand.doExecute(curator);

    // Then
    verify(createBuilder).forPath(createCommand.path, createCommand.data.getBytes());
  }
示例#2
0
  @Test
  public void shouldCreateRecursivePathWithData() throws Exception {
    // Given
    createCommand.recursive = true;
    createCommand.data = "node data";

    // When
    createCommand.doExecute(curator);

    // Then
    verify(createBuilder).creatingParentsIfNeeded();
    verify(createBuilder).forPath(createCommand.path, createCommand.data.getBytes());
  }