Skip to content

Commit

Permalink
added a test to check error handling for doc status
Browse files Browse the repository at this point in the history
Signed-off-by: Philippe Edwards <philippe.edwards@rte-france.com>
  • Loading branch information
phiedw committed Dec 14, 2023
1 parent bee4371 commit 69087ec
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import java.io.InputStream;
import java.time.Instant;
import java.time.ZonedDateTime;
import java.util.Iterator;
Expand Down Expand Up @@ -57,6 +58,12 @@ void baseTests() {
assertFalse(exchanges.getDomainCodingScheme().isPresent());
}

@Test
void testErrorInCodeStatus() {
InputStream inputStream = getClass().getResourceAsStream("/testPEVFMarketDocument_2-0_error_doc_status.xml");
assertThrows(RuntimeException.class, () -> DataExchangesXml.parse(inputStream));
}

@Test
void timeSeriesTests() {
// Time Series
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ReportingInformation_MarketDocument xmlns="urn:entsoe.eu:wgedi:rgce:reportinginformation_marketdocument:2:0">
<mRID>MarketDocument_MRID</mRID>
<revisionNumber>1</revisionNumber>
<type>B19</type>
<process.processType>A01</process.processType>
<sender_MarketParticipant.mRID codingScheme="A01">SenderMarket</sender_MarketParticipant.mRID>
<sender_MarketParticipant.marketRole.type>A32</sender_MarketParticipant.marketRole.type>
<receiver_MarketParticipant.mRID codingScheme="A01">ReceiverMarket</receiver_MarketParticipant.mRID>
<receiver_MarketParticipant.marketRole.type>A33</receiver_MarketParticipant.marketRole.type>
<createdDateTime>2020-04-05T14:30:00Z</createdDateTime>
<time_Period.timeInterval>
<start>2020-04-05T22:00Z</start>
<end>2020-04-06T22:00Z</end>
</time_Period.timeInterval>
<dataset_MarketDocument.mRID>PEVF CGM Export</dataset_MarketDocument.mRID>
<docStatus>
<value>A<>01</value>
</docStatus>
</ReportingInformation_MarketDocument>

0 comments on commit 69087ec

Please sign in to comment.