Exemplo n.º 1
0
 @Test
 public void shouldReturnIndexOfPipeline() {
   PipelineConfigs group = createWithPipeline(PipelineConfigMother.pipelineConfig("pipeline1"));
   PipelineConfig pipelineConfig = (PipelineConfig) group.get(0).clone();
   pipelineConfig.setLabelTemplate("blah");
   group.update(group.getGroup(), pipelineConfig, "pipeline1");
   assertThat(group.get(0).getLabelTemplate(), is("blah"));
 }
Exemplo n.º 2
0
  @Test
  public void shouldAddPipelineAtIndex() {
    PipelineConfigs group = createWithPipeline(PipelineConfigMother.pipelineConfig("pipeline0"));

    PipelineConfig p1 = PipelineConfigMother.pipelineConfig("pipeline1");
    group.add(1, p1);

    assertThat(group.get(1), is(p1));
  }
Exemplo n.º 3
0
  @Test
  public void shouldRemovePipeline() {
    PipelineConfig p0 = PipelineConfigMother.pipelineConfig("pipeline0");
    PipelineConfigs group = createWithPipeline(p0);

    PipelineConfig p1 = PipelineConfigMother.pipelineConfig("pipeline1");
    group.add(1, p1);

    group.remove(p0);

    assertThat(group.get(0), is(p1));
    assertThat(group.size(), is(1));
  }