daily pastebin goal
45%
SHARE
TWEET

ds

a guest Oct 17th, 2017 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class test2 extends Application {
  2.  
  3.     @Override
  4.     public void start(Stage primaryStage) {
  5.         try {
  6.             Parent root = FXMLLoader.load(getClass().getResource("/application/Login.fxml"));
  7.             Scene scene = new Scene(root);
  8.             scene.getStylesheets().add(getClass().getResource("application.css").toExternalForm());
  9.             primaryStage.setScene(scene);
  10.             primaryStage.setTitle("Login");
  11.             primaryStage.show();
  12.         } catch(Exception e) {
  13.             e.printStackTrace();
  14.         }
  15.     }
  16.  
  17.     @Before
  18.     public void startMain(){
  19.         Main main = new Main();
  20.         launch(main.getClass());
  21.     }
  22.    
  23.     @Test
  24.     public void logTest() throws IOException{
  25.            
  26.         LoginController log = new LoginController();
  27.        
  28.         String USERNAME = log.getLogin().getText().toString();
  29.         String PASSWORD = log.getPassword().getText().toString();
  30.  
  31.         String login = "log";
  32.         String pass = "pass";
  33.        
  34.         assertEquals(login, USERNAME);
  35.         assertEquals(pass, PASSWORD);
  36.  
  37.     }
  38.  
  39. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top