Skip to content

Commit

Permalink
add UT
Browse files Browse the repository at this point in the history
Signed-off-by: Godelaine de Montmorillon <[email protected]>
  • Loading branch information
Godelaine committed Dec 16, 2024
1 parent 302d273 commit 2b50084
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -372,4 +372,21 @@ void testCurativeResultAtOutageInstant() {

}

@Test
void testCompleteDataWithFailingPerimeter() {
setUpWith12Nodes();
// When
SensitivityAnalysisResult sensitivityAnalysisResult = SensitivityAnalysis.find().run(network,
rangeActionSensitivityProvider.getAllFactors(network),
rangeActionSensitivityProvider.getContingencies(network),
new ArrayList<>(),
SensitivityAnalysisParameters.load());
SystematicSensitivityResult result = new SystematicSensitivityResult().completeData(sensitivityAnalysisResult, outageInstantOrder);
assertEquals(SystematicSensitivityResult.SensitivityComputationStatus.SUCCESS, result.getStatus());

result.completeDataWithFailingPerimeter(outageInstantOrder, "Contingency FR1 FR3");
// after computation failure on contingency
assertEquals(SystematicSensitivityResult.SensitivityComputationStatus.PARTIAL_FAILURE, result.getStatus());
}

}

0 comments on commit 2b50084

Please sign in to comment.