Skip to content

Commit

Permalink
Complete coverage
Browse files Browse the repository at this point in the history
Signed-off-by: BAUDRIER Dimitri <dimitri.baudrier@rte-france.com>
  • Loading branch information
BAUDRIER Dimitri committed Nov 18, 2022
1 parent 11910e1 commit 78afbcc
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ public void exceptionWhenUnmergingWrongNetwork() {
assertThrows("Not associated to the right network. Linked to " + network.getId(), PowsyblException.class, () -> dynawoResultsMergeLoads.unmergeLoads(otherNetwork));
}

@Test
public void exceptionWhenUnmergeUntouchedNetwork() {
Network network = Importers.importData("XIIDM", new ResourceDataSource("MicroAssembled", new ResourceSet("/MicroAssembled", "MicroAssembled.xiidm")), null);
DynawoResultsMergeLoads dynawoResultsMergeLoads = new DynawoResultsMergeLoads(network.getId());

assertThrows("There is no merged loads for network id " + network.getId(), PowsyblException.class, () -> dynawoResultsMergeLoads.unmergeLoads(network));
}

@Test
public void mergeLoadsMicroAssembled() throws IOException {
Network network = Importers.importData("XIIDM", new ResourceDataSource("MicroAssembled", new ResourceSet("/MicroAssembled", "MicroAssembled.xiidm")), null);
Expand Down

0 comments on commit 78afbcc

Please sign in to comment.