-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new overload for loadNetwork and improve code in Importers #1986
Conversation
Signed-off-by: VEDELAGO MIORA <miora.ralambotiana@rte-france.com>
Signed-off-by: VEDELAGO MIORA <miora.ralambotiana@rte-france.com>
3ce7647
to
70c9529
Compare
public void importData() { | ||
Network network = Importers.importData(loader, TEST_FORMAT, null, null, computationManager, importConfigMock); | ||
public void importData() throws IOException { | ||
Network network = Importers.loadNetwork((ReadOnlyDataSource) null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably has nothing to do with this PR, but what is the purpose of this test?????
Why are we allowing a null data source and then check that with a mock importer, we have succeed to import a network?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it would worth a fix but could be done in another PR, as you wish
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it was to test if the importer was found in the LOADER and not the importer itself (it tests the mechanisms to find an importer).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it was to test if the importer was found in the LOADER and not the importer itself (it tests the mechanisms to find an importer).
In any case null datasource should throw an exception even in such a test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm writing an issue about it
Kudos, SonarCloud Quality Gate passed! |
Signed-off-by: VEDELAGO MIORA miora.ralambotiana@rte-france.com
Please check if the PR fulfills these requirements (please use
'[x]'
to check the checkboxes, or submit the PR and then click the checkboxes)Does this PR already have an issue describing the problem ? If so, link to this issue using
'#XXX'
and skip the restNo
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature : Add some overload of
Importers.loadNetwork
which allowsReadOnlyDataSource
as parameterDoes this PR introduce a breaking change or deprecate an API? If yes, check the following:
No