Skip to content

Commit

Permalink
fixed warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-Draeger committed Feb 22, 2024
1 parent 5483f7a commit d4e4a3f
Showing 1 changed file with 9 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -919,12 +919,9 @@ void testUniqueEpisodicReportBasedHistoryFailInvalidateTestRunWhenSameReportType
* Tests if applyReportOnStorage() can gracefully ignore OperationInvokedReports.
* NOTE: this is a regression test: before it was fixed, applyReportOnStorage() did fail with an Exception
* in this case.
* @throws ReportProcessingException - when applyReportOnStorage() throws it
* @throws PreprocessingException - when applyReportOnStorage() throws it
*/
@Test
void testApplyReportOnStorageRegressionCalledWithOperationInvokedReport()
throws ReportProcessingException, PreprocessingException {
void testApplyReportOnStorageRegressionCalledWithOperationInvokedReport() {

// given
final BigInteger numericMdibVersion = BigInteger.ZERO;
Expand All @@ -943,12 +940,9 @@ void testApplyReportOnStorageRegressionCalledWithOperationInvokedReport()
* Tests if applyReportOnStorage() can gracefully ignore SystemErrorReports.
* NOTE: this is a regression test: before it was fixed, applyReportOnStorage() did fail with an Exception
* in this case.
* @throws ReportProcessingException - when applyReportOnStorage() throws it
* @throws PreprocessingException - when applyReportOnStorage() throws it
*/
@Test
void testApplyReportOnStorageRegressionCalledWithSystemErrorReport()
throws ReportProcessingException, PreprocessingException {
void testApplyReportOnStorageRegressionCalledWithSystemErrorReport() {

// given
final BigInteger numericMdibVersion = BigInteger.ZERO;
Expand All @@ -970,14 +964,12 @@ void testApplyReportOnStorageRegressionCalledWithSystemErrorReport()
* Tests if uniqueEpisodicReportBasedHistoryUntilTimestamp() gracefully ignores OperationInvokedReports.
* NOTE: this is a regression test as uniqueEpisodicReportBasedHistoryUntilTimestamp() failed in this case
* before.
* @throws ReportProcessingException - when thrown by uniqueEpisodicReportBasedHistoryUntilTimestamp()
* @throws JAXBException - when thrown by the MessageStorage
* @throws PreprocessingException - when thrown by uniqueEpisodicReportBasedHistoryUntilTimestamp()
* @throws IOException - when thrown by the MessageStorage
*/
@Test
void testUniqueEpisodicReportBasedHistoryUntilTimestampRegressionWithOperationInvokedReport()
throws ReportProcessingException, JAXBException, PreprocessingException, IOException {
throws JAXBException, IOException {

final BigInteger numericMdibVersion = BigInteger.ZERO;
final String sequenceId = "abc";
Expand Down Expand Up @@ -1011,14 +1003,12 @@ void testUniqueEpisodicReportBasedHistoryUntilTimestampRegressionWithOperationIn
* Tests if uniqueEpisodicReportBasedHistoryUntilTimestamp() gracefully ignores SystemErrorReports.
* NOTE: this is a regression test as uniqueEpisodicReportBasedHistoryUntilTimestamp() failed in this case
* before.
* @throws ReportProcessingException - when thrown by uniqueEpisodicReportBasedHistoryUntilTimestamp()
* @throws JAXBException - when thrown by the MessageStorage
* @throws PreprocessingException - when thrown by uniqueEpisodicReportBasedHistoryUntilTimestamp()
* @throws IOException - when thrown by the MessageStorage
*/
@Test
void testUniqueEpisodicReportBasedHistoryUntilTimestampRegressionWithSystemErrorReport()
throws ReportProcessingException, JAXBException, PreprocessingException, IOException {
throws JAXBException, IOException {

final String sequenceId = "abc";

Expand All @@ -1031,7 +1021,7 @@ void testUniqueEpisodicReportBasedHistoryUntilTimestampRegressionWithSystemError
}

private void testUniqueEpisodicReportBasedHistoryUntilTimestamp(final String sequenceId, final Envelope soapMessage)
throws IOException, JAXBException, ReportProcessingException, PreprocessingException {
throws IOException, JAXBException {
// given
final var mockObserver = mock(TestRunObserver.class);
final var historianUnderTest = historianFactory.createMdibHistorian(storage, mockObserver);
Expand Down Expand Up @@ -1062,14 +1052,11 @@ private void testUniqueEpisodicReportBasedHistoryUntilTimestamp(final String seq
/**
* Tests if episodicReportBasedHistory() gracefully ignores OperationInvokedReports.
* NOTE: this is a regression test as episodicReportBasedHistory() failed in this case before.
* @throws ReportProcessingException - when thrown by episodicReportBasedHistory()
* @throws JAXBException - when thrown by the MessageStorage
* @throws PreprocessingException - when thrown by episodicReportBasedHistory()
* @throws IOException - when thrown by the MessageStorage
*/
@Test
void testEpisodicReportBasedHistoryRegressionWithOperationInvokedReport()
throws ReportProcessingException, JAXBException, PreprocessingException, IOException {
void testEpisodicReportBasedHistoryRegressionWithOperationInvokedReport() throws JAXBException, IOException {

// given
final BigInteger numericMdibVersion = BigInteger.ZERO;
Expand Down Expand Up @@ -1102,14 +1089,11 @@ void testEpisodicReportBasedHistoryRegressionWithOperationInvokedReport()
/**
* Tests if episodicReportBasedHistory() gracefully ignores SystemErrorReports.
* NOTE: this is a regression test as episodicReportBasedHistory() failed in this case before.
* @throws ReportProcessingException - when thrown by episodicReportBasedHistory()
* @throws JAXBException - when thrown by the MessageStorage
* @throws PreprocessingException - when thrown by episodicReportBasedHistory()
* @throws IOException - when thrown by the MessageStorage
*/
@Test
void testEpisodicReportBasedHistoryRegressionWithSystemErrorReport()
throws ReportProcessingException, JAXBException, PreprocessingException, IOException {
void testEpisodicReportBasedHistoryRegressionWithSystemErrorReport() throws JAXBException, IOException {

// given
final BigInteger numericMdibVersion = BigInteger.ZERO;
Expand All @@ -1129,13 +1113,11 @@ void testEpisodicReportBasedHistoryRegressionWithSystemErrorReport()
* Tests if episodicReportBasedHistory() gracefully ignores a given report.
* @param report - the report to ignore
* @param sequenceId - the sequenceId of the report
* @throws ReportProcessingException - when thrown by episodicReportBasedHistory()
* @throws JAXBException - when thrown by the MessageStorage
* @throws PreprocessingException - when thrown by episodicReportBasedHistory()
* @throws IOException - when thrown by the MessageStorage
*/
void testEpisodicReportBasedHistory(final Envelope report, final String sequenceId)
throws ReportProcessingException, PreprocessingException, JAXBException, IOException {
throws JAXBException, IOException {
// given
final var mockObserver = mock(TestRunObserver.class);
final var historianUnderTest = historianFactory.createMdibHistorian(storage, mockObserver);
Expand Down Expand Up @@ -1186,8 +1168,7 @@ private static CodedValue createCodedValue(
}

private void testApplyReportOnStorage(
final BigInteger numericMdibVersion, final String sequenceId, final AbstractReport report)
throws PreprocessingException, ReportProcessingException {
final BigInteger numericMdibVersion, final String sequenceId, final AbstractReport report) {
final RemoteMdibAccess mdibAccess = mock(RemoteMdibAccess.class);
final MdibVersion mdibVersion = new MdibVersion(sequenceId, numericMdibVersion);
final var mockObserver = mock(TestRunObserver.class);
Expand Down

0 comments on commit d4e4a3f

Please sign in to comment.