Extract ViewLoader interface and introduce FxmlViewLoader

This commit is contained in:
Chris Beams 2014-11-24 08:15:20 +01:00
parent 2705e80ef1
commit a2c98d9ea3
No known key found for this signature in database
GPG key ID: 3D214F8F5BC5ED73
18 changed files with 56 additions and 31 deletions

View file

@ -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);
}
}