Package org.sonar.api.server.debt.internal

Examples of org.sonar.api.server.debt.internal.DefaultDebtCharacteristic


  }

  @Test
  public void restore_from_xml_add_warning_message_when_rule_from_xml_is_not_found() throws Exception {
    when(characteristicsXMLImporter.importXML(anyString())).thenReturn(new DebtModel()
      .addRootCharacteristic(new DefaultDebtCharacteristic().setKey("PORTABILITY").setName("Portability").setOrder(1))
      .addSubCharacteristic(new DefaultDebtCharacteristic().setKey("COMPILER").setName("Compiler"), "PORTABILITY"));

    when(dao.selectEnabledCharacteristics(session)).thenReturn(newArrayList(
      new CharacteristicDto().setId(1).setKey("PORTABILITY").setName("Portability").setOrder(1).setCreatedAt(oldDate),
      new CharacteristicDto().setId(2).setKey("COMPILER").setName("Compiler").setParentId(1).setCreatedAt(oldDate)));
View Full Code Here


  }

  @Test
  public void restore_from_xml_add_error_message_when_illegal_argument_exception() throws Exception {
    when(characteristicsXMLImporter.importXML(anyString())).thenReturn(new DebtModel()
      .addRootCharacteristic(new DefaultDebtCharacteristic().setKey("PORTABILITY").setName("Portability").setOrder(1))
      .addSubCharacteristic(new DefaultDebtCharacteristic().setKey("COMPILER").setName("Compiler"), "PORTABILITY"));

    when(dao.selectEnabledCharacteristics(session)).thenReturn(newArrayList(
      new CharacteristicDto().setId(1).setKey("PORTABILITY").setName("Portability").setOrder(1).setCreatedAt(oldDate),
      new CharacteristicDto().setId(2).setKey("COMPILER").setName("Compiler").setParentId(1).setCreatedAt(oldDate)));
View Full Code Here

TOP

Related Classes of org.sonar.api.server.debt.internal.DefaultDebtCharacteristic

Copyright © 2018 www.massapicom. 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.