Fix problem in test
It was not throwing the exception due to the cause stated in the test. FEA: ItEr60S04ValidacionEProbasFuncionaisItEr59S04
This commit is contained in:
parent
5472ba7ac4
commit
f91034fc1b
2 changed files with 4 additions and 4 deletions
|
|
@ -135,8 +135,6 @@ public class TransferOrdersModel implements ITransferOrdersModel {
|
|||
@Override
|
||||
@Transactional
|
||||
public void transfer(Order order) throws ValidationException {
|
||||
orderDAO.save(order);
|
||||
|
||||
Scenario sourceScenario = getSourceScenario();
|
||||
Scenario destinationScenario = getDestinationScenario();
|
||||
|
||||
|
|
@ -170,6 +168,7 @@ public class TransferOrdersModel implements ITransferOrdersModel {
|
|||
_("Order version is the same in source and destination scenarios"));
|
||||
}
|
||||
|
||||
orderDAO.save(order);
|
||||
order.useSchedulingDataFor(sourceOrderVersion);
|
||||
|
||||
OrderVersion newOrderVersion = OrderVersion
|
||||
|
|
|
|||
|
|
@ -230,11 +230,12 @@ public class TransferOrdersModelTest {
|
|||
transactionService.runOnTransaction(new IOnTransaction<Void>() {
|
||||
@Override
|
||||
public Void execute() {
|
||||
// reload order so it has the relationship with destination
|
||||
Order orderReloaded = orderDAO.findExistingEntity(order.getId());
|
||||
transferOrdersModel.setSourceScenario(source);
|
||||
transferOrdersModel.setDestinationScenario(destination);
|
||||
|
||||
transferOrdersModel.transfer(order);
|
||||
|
||||
transferOrdersModel.transfer(orderReloaded);
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue