[Bug #662] Removed test "orderWithLabelRepeatedInTheSameBranchIsNotAddedTwice".
The test is removed because of since commit
b446658fe2 is not possible to add the same label
twice in the same branch (this is managed with method removeLabelOnChildren that
is automatically called in addLabel).
FEA: ItEr61S05BugFixing
This commit is contained in:
parent
a9bf55a7fa
commit
cc61ab72b9
1 changed files with 0 additions and 32 deletions
|
|
@ -614,38 +614,6 @@ public class OrderElementServiceTest {
|
|||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void orderWithLabelRepeatedInTheSameBranchIsNotAddedTwice() {
|
||||
int previous = orderDAO.getOrders().size();
|
||||
|
||||
OrderDTO orderDTO = new OrderDTO();
|
||||
orderDTO.name = "Order name " + UUID.randomUUID().toString();
|
||||
orderDTO.code = "order-code " + UUID.randomUUID().toString();
|
||||
orderDTO.initDate = DateConverter.toXMLGregorianCalendar(new Date());
|
||||
|
||||
LabelReferenceDTO labelReferenceDTO = new LabelReferenceDTO();
|
||||
labelReferenceDTO.code = labelCode;
|
||||
orderDTO.labels.add(labelReferenceDTO);
|
||||
|
||||
OrderLineDTO orderLineDTO = new OrderLineDTO();
|
||||
orderLineDTO.name = "Order line";
|
||||
orderLineDTO.code = "order-line-code";
|
||||
HoursGroupDTO hoursGroupDTO = new HoursGroupDTO("hours-group",
|
||||
ResourceEnumDTO.WORKER, 1000,
|
||||
new HashSet<CriterionRequirementDTO>());
|
||||
orderLineDTO.hoursGroups.add(hoursGroupDTO);
|
||||
orderLineDTO.labels.add(labelReferenceDTO);
|
||||
orderDTO.children.add(orderLineDTO);
|
||||
|
||||
OrderListDTO orderListDTO = createOrderListDTO(orderDTO);
|
||||
List<InstanceConstraintViolationsDTO> instanceConstraintViolationsList = orderElementService
|
||||
.addOrders(orderListDTO).instanceConstraintViolationsList;
|
||||
assertTrue(instanceConstraintViolationsList.toString(),
|
||||
instanceConstraintViolationsList.size() == 1);
|
||||
|
||||
assertThat(orderDAO.getOrders().size(), equalTo(previous));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void updateLabels() throws InstanceNotFoundException,
|
||||
IncompatibleTypeException {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue