Package org.sonar.api.server.debt

Examples of org.sonar.api.server.debt.DebtCharacteristic.order()


    DebtCharacteristic result = service.moveUp(10);

    verify(dao, times(2)).update(characteristicCaptor.capture(), eq(session));

    assertThat(result.order()).isEqualTo(1);
    assertThat(characteristicCaptor.getAllValues().get(0).getOrder()).isEqualTo(2);
    assertThat(characteristicCaptor.getAllValues().get(0).getUpdatedAt()).isEqualTo(now);
    assertThat(characteristicCaptor.getAllValues().get(1).getOrder()).isEqualTo(1);
    assertThat(characteristicCaptor.getAllValues().get(1).getUpdatedAt()).isEqualTo(now);
  }
View Full Code Here


    DebtCharacteristic result = service.moveDown(10);

    verify(dao, times(2)).update(characteristicCaptor.capture(), eq(session));

    assertThat(result.order()).isEqualTo(3);
    assertThat(characteristicCaptor.getAllValues().get(0).getOrder()).isEqualTo(2);
    assertThat(characteristicCaptor.getAllValues().get(0).getUpdatedAt()).isEqualTo(now);
    assertThat(characteristicCaptor.getAllValues().get(1).getOrder()).isEqualTo(3);
    assertThat(characteristicCaptor.getAllValues().get(1).getUpdatedAt()).isEqualTo(now);
  }
View Full Code Here

    DebtCharacteristic result = debtModelService.create("New characteristic", null);

    assertThat(result.name()).isEqualTo("New characteristic");
    assertThat(result.key()).isEqualTo("NEW_CHARACTERISTIC");
    assertThat(result.isSub()).isFalse();
    assertThat(result.order()).isEqualTo(nb + 1);

    assertThat(debtModelService.characteristicByKey(result.key())).isNotNull();
  }

  @Test
View Full Code Here

    DebtCharacteristic result = debtModelService.create("New characteristic", parent.id());

    assertThat(result.name()).isEqualTo("New characteristic");
    assertThat(result.key()).isEqualTo("NEW_CHARACTERISTIC");
    assertThat(result.isSub()).isTrue();
    assertThat(result.order()).isNull();

    assertThat(debtModelService.characteristicByKey(result.key())).isNotNull();
  }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.