sialcasa / mvvmFX

an Application Framework for implementing the MVVM Pattern with JavaFX
Apache License 2.0
489 stars 104 forks source link

FxmlViewLoader now uses ViewType to load resources #555

Closed mateusz-lisik closed 5 years ago

mateusz-lisik commented 6 years ago

Change is made in order to load FXML files across modules. This implementation was made in a way that doesn't affect java 8 runtime.

manuel-mauky commented 6 years ago

Hi @matteprl thank you very much for this Pull Request. One question: Is there any way to test this behaviour with JUnit? My concern is that if we don't have a test case then in the future a refactoring might break this behaviour without us noticing.

I assume that creating a separate maven module with a View/ViewModel and using it in the core module in a test case might be enough? Would this break on Java 9 without your change? We would need to add Java 9 (or higher) to the travis-ci builds then but this would be a good idea anyway.

mateusz-lisik commented 6 years ago

@lestard That's very valid point. I was trying to figure out how to write such test. Perhaps creating module that stores some views solely for testing purposes may work. I'll be able to work on this issue next week.

manuel-mauky commented 5 years ago

I will merge this PR for now because this way it's easier for others to test the fix. However, I will keep the issue open until we have added proper tests for this fix.