mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-07-24 15:35:34 -04:00
Extract ViewLoader interface and introduce FxmlViewLoader
This commit is contained in:
parent
2705e80ef1
commit
a2c98d9ea3
18 changed files with 56 additions and 31 deletions
|
@ -29,7 +29,7 @@ import java.net.MalformedURLException;
|
|||
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import viewfx.view.support.ViewLoader;
|
||||
import viewfx.view.fxml.FxmlViewLoader;
|
||||
import viewfx.view.support.guice.GuiceViewFactory;
|
||||
|
||||
import javafx.application.Application;
|
||||
|
@ -81,11 +81,11 @@ public class ViewLoaderTests {
|
|||
|
||||
@Test(expected = BitsquareException.class)
|
||||
public void loadingBogusFxmlResourceShouldThrow() throws MalformedURLException {
|
||||
new ViewLoader(viewFactory, resourceBundle).load(Navigation.Item.BOGUS.getFxmlUrl(), false);
|
||||
new FxmlViewLoader(viewFactory, resourceBundle).load(Navigation.Item.BOGUS.getFxmlUrl(), false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void loadingValidFxmlResourceShouldNotThrow() {
|
||||
new ViewLoader(viewFactory, resourceBundle).load(Navigation.Item.ACCOUNT.getFxmlUrl(), false);
|
||||
new FxmlViewLoader(viewFactory, resourceBundle).load(Navigation.Item.ACCOUNT.getFxmlUrl(), false);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue