1 package unit.ui.user_interface_launcher;
3 import org.jmock.Expectations;
4 import org.jmock.Mockery;
5 import org.junit.Before;
10 import java.io.IOException;
12 import static org.junit.Assert.assertNotNull;
13 import static org.junit.Assert.fail;
22 public void setLauncher(){
27 public void start()
throws Exception {
28 this.applicationContext.getBean(
30 ).checking(
new ExpectationsForSetPrimaryStage());
33 assertNotNull(this.launcher);
36 private class ExpectationsForSetPrimaryStage
extends Expectations {
37 private final FXMLStage mockApplication = applicationContext.getBean(
41 public ExpectationsForSetPrimaryStage(){
42 oneOf(mockApplication).
show();
43 loadFXMLExpectation();
46 private void loadFXMLExpectation(){
48 oneOf(mockApplication).loadFXML();
49 }
catch (IOException error){
50 fail(
"Unable to set LoadFXML expectation. This shouldn't " +