Advertisement
Guest User

asd

a guest
Oct 17th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.89 KB | None | 0 0
  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();
  29.         String PASSWORD = log.getPassword().getText();
  30.  
  31.         String login = "log";
  32.         String pass = "pass";
  33.        
  34.         assertEquals(login, USERNAME);
  35.         assertEquals(pass, PASSWORD);
  36.  
  37.     }
  38.  
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement