Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class test2 extends Application {
- @Override
- public void start(Stage primaryStage) {
- try {
- Parent root = FXMLLoader.load(getClass().getResource("/application/Login.fxml"));
- Scene scene = new Scene(root);
- scene.getStylesheets().add(getClass().getResource("application.css").toExternalForm());
- primaryStage.setScene(scene);
- primaryStage.setTitle("Login");
- primaryStage.show();
- } catch(Exception e) {
- e.printStackTrace();
- }
- }
- @Before
- public void startMain(){
- Main main = new Main();
- launch(main.getClass());
- }
- @Test
- public void logTest() throws IOException{
- LoginController log = new LoginController();
- String USERNAME = log.getLogin().getText();
- String PASSWORD = log.getPassword().getText();
- String login = "log";
- String pass = "pass";
- assertEquals(login, USERNAME);
- assertEquals(pass, PASSWORD);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement