Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
c8ae7da11b
4 changed files with 80 additions and 143 deletions
|
@ -1,51 +0,0 @@
|
||||||
package uk.ac.aber.cs221.group20.test;
|
|
||||||
|
|
||||||
import javafx.event.ActionEvent;
|
|
||||||
import org.junit.jupiter.api.AfterEach;
|
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
|
||||||
import org.junit.jupiter.api.Test;
|
|
||||||
import uk.ac.aber.cs221.group20.javafx.AddWordController;
|
|
||||||
import uk.ac.aber.cs221.group20.javafx.AddWordController;
|
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.*;
|
|
||||||
|
|
||||||
class AddWordControllerTest {
|
|
||||||
AddWordController testController = new AddWordController();
|
|
||||||
|
|
||||||
@BeforeEach
|
|
||||||
void setUp() {
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@AfterEach
|
|
||||||
void tearDown() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
void addButtonClick() {
|
|
||||||
testController.getEnglish();
|
|
||||||
// assertEquals();*
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Test
|
|
||||||
void testSpecialCharacters(ActionEvent actionEvent) {
|
|
||||||
testController.addCharch(actionEvent);
|
|
||||||
testController.addChardd(actionEvent);
|
|
||||||
testController.addCharff(actionEvent);
|
|
||||||
testController.addCharng(actionEvent);
|
|
||||||
testController.addCharll(actionEvent);
|
|
||||||
testController.addCharph(actionEvent);
|
|
||||||
testController.addCharrh(actionEvent);
|
|
||||||
testController.addCharth(actionEvent);
|
|
||||||
|
|
||||||
String allChars = "chddffngllphrhth";
|
|
||||||
|
|
||||||
assertEquals(allChars,testController.getWelsh().getText());
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,54 +0,0 @@
|
||||||
package uk.ac.aber.cs221.group20.test;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class that contains methods to test that the application class is correctly storing the full
|
|
||||||
* list of dictionary definitions.
|
|
||||||
* Furthermore, this class will also test that the elements such as the sliding menu and score counter are
|
|
||||||
* working as intended, along with testing that scenes are ending and transitioning correctly when
|
|
||||||
* applicable.
|
|
||||||
* @Author
|
|
||||||
* @Version
|
|
||||||
* @See
|
|
||||||
*/
|
|
||||||
public class JavaFXTest {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Tests to confirm that the dictionary definitions loaded match to an
|
|
||||||
* identical base set.
|
|
||||||
*/
|
|
||||||
@test public void testDefinition(){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test to confirm that the user score counter correctly increases
|
|
||||||
* by increments on one.
|
|
||||||
*/
|
|
||||||
@test public void testScoreCounter(){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A preset search test to confirm that words are being searched for
|
|
||||||
* correctly.
|
|
||||||
*/
|
|
||||||
@test public void testFindWord(){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A test to check that a new word is correctly added and saved to
|
|
||||||
* the JSON file.
|
|
||||||
*/
|
|
||||||
@test public void testAddWord(){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*A test to check that the JSON file is correctly updated when a
|
|
||||||
* word is removed.
|
|
||||||
*/
|
|
||||||
@test public void testRemoveWord(){
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,36 +0,0 @@
|
||||||
package uk.ac.aber.cs221.group20.test;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This class will test that the lists pulled in the self-assessment package are indeed
|
|
||||||
* random, while also pulling the matching data from the dictionary.
|
|
||||||
* @Author
|
|
||||||
* @Version
|
|
||||||
* @See
|
|
||||||
*/
|
|
||||||
public class SelfAssesmentTest {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test to confirm that the random number return is working
|
|
||||||
* correctly.
|
|
||||||
*/
|
|
||||||
@test
|
|
||||||
public void testRandomReturn(){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test to check and confirm that the game types are
|
|
||||||
* either made available or are locked off depending on the number of practice list questions.
|
|
||||||
*/
|
|
||||||
@test
|
|
||||||
public void testAvailableSelfAssessment(){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Test that will check that an input by a user is correctly checked
|
|
||||||
* to the correct answer.
|
|
||||||
*/
|
|
||||||
@test
|
|
||||||
public void testUserAnswer(){}
|
|
||||||
}
|
|
|
@ -1,19 +1,25 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<?import java.lang.String?>
|
||||||
|
<?import javafx.collections.FXCollections?>
|
||||||
<?import javafx.geometry.Insets?>
|
<?import javafx.geometry.Insets?>
|
||||||
|
<?import javafx.scene.control.ComboBox?>
|
||||||
<?import javafx.scene.control.Label?>
|
<?import javafx.scene.control.Label?>
|
||||||
<?import javafx.scene.control.TextField?>
|
<?import javafx.scene.control.TextField?>
|
||||||
<?import javafx.scene.image.ImageView?>
|
<?import javafx.scene.image.ImageView?>
|
||||||
<?import javafx.scene.layout.BorderPane?>
|
<?import javafx.scene.layout.BorderPane?>
|
||||||
|
<?import javafx.scene.layout.ColumnConstraints?>
|
||||||
|
<?import javafx.scene.layout.GridPane?>
|
||||||
<?import javafx.scene.layout.HBox?>
|
<?import javafx.scene.layout.HBox?>
|
||||||
<?import javafx.scene.layout.Pane?>
|
<?import javafx.scene.layout.Pane?>
|
||||||
|
<?import javafx.scene.layout.RowConstraints?>
|
||||||
<?import javafx.scene.layout.StackPane?>
|
<?import javafx.scene.layout.StackPane?>
|
||||||
<?import javafx.scene.layout.VBox?>
|
<?import javafx.scene.layout.VBox?>
|
||||||
<?import javafx.scene.shape.Rectangle?>
|
<?import javafx.scene.shape.Rectangle?>
|
||||||
<?import javafx.scene.text.Font?>
|
<?import javafx.scene.text.Font?>
|
||||||
<?import javafx.scene.text.Text?>
|
<?import javafx.scene.text.Text?>
|
||||||
|
|
||||||
<BorderPane fx:id="container" minHeight="550" minWidth="450" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="uk.ac.aber.cs221.group20.javafx.TranslationController">
|
<BorderPane fx:id="container" minHeight="550" minWidth="450" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="uk.ac.aber.cs221.group20.javafx.TranslationController">
|
||||||
|
|
||||||
|
|
||||||
<left>
|
<left>
|
||||||
|
@ -162,9 +168,81 @@
|
||||||
</Text>
|
</Text>
|
||||||
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
|
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
|
||||||
<children>
|
<children>
|
||||||
<TextField fx:id="translationBox" prefHeight="45.0" prefWidth="188.0" promptText="Enter translation here" />
|
<TextField fx:id="translationBox" alignment="CENTER" prefHeight="45.0" prefWidth="188.0" promptText="Enter translation here">
|
||||||
|
<font>
|
||||||
|
<Font size="14.0" />
|
||||||
|
</font></TextField>
|
||||||
<ImageView fx:id="submitButton" fitHeight="46.0" fitWidth="69.0" onMouseClicked="#translateWord" pickOnBounds="true" preserveRatio="true" />
|
<ImageView fx:id="submitButton" fitHeight="46.0" fitWidth="69.0" onMouseClicked="#translateWord" pickOnBounds="true" preserveRatio="true" />
|
||||||
</children>
|
</children>
|
||||||
|
</HBox>
|
||||||
|
<HBox alignment="CENTER" prefHeight="41.0" prefWidth="597.0">
|
||||||
|
<children>
|
||||||
|
<GridPane prefHeight="41.0" prefWidth="273.0">
|
||||||
|
<columnConstraints>
|
||||||
|
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||||
|
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||||
|
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||||
|
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||||
|
</columnConstraints>
|
||||||
|
<rowConstraints>
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
|
</rowConstraints>
|
||||||
|
<children>
|
||||||
|
<ComboBox fx:id="specialChar1" onAction="#specialChar1" prefWidth="56.0" promptText="â">
|
||||||
|
<items>
|
||||||
|
<FXCollections fx:factory="observableArrayList">
|
||||||
|
<String fx:value="â" />
|
||||||
|
<String fx:value="ê" />
|
||||||
|
<String fx:value="î" />
|
||||||
|
<String fx:value="ô" />
|
||||||
|
<String fx:value="û" />
|
||||||
|
<String fx:value="ŵ" />
|
||||||
|
<String fx:value="ŷ" />
|
||||||
|
</FXCollections>
|
||||||
|
</items>
|
||||||
|
</ComboBox>
|
||||||
|
<ComboBox fx:id="specialChar2" onAction="#specialChar2" prefWidth="56.0" promptText="ä" GridPane.columnIndex="2">
|
||||||
|
<items>
|
||||||
|
<FXCollections fx:factory="observableArrayList">
|
||||||
|
<String fx:value="ä" />
|
||||||
|
<String fx:value="ë" />
|
||||||
|
<String fx:value="ï" />
|
||||||
|
<String fx:value="ö" />
|
||||||
|
<String fx:value="ü" />
|
||||||
|
<String fx:value="ẅ" />
|
||||||
|
<String fx:value="ÿ" />
|
||||||
|
</FXCollections>
|
||||||
|
</items>
|
||||||
|
</ComboBox>
|
||||||
|
<ComboBox fx:id="specialChar3" onAction="#specialChar3" prefWidth="56.0" promptText="á" GridPane.columnIndex="1">
|
||||||
|
<items>
|
||||||
|
<FXCollections fx:factory="observableArrayList">
|
||||||
|
<String fx:value="á" />
|
||||||
|
<String fx:value="é" />
|
||||||
|
<String fx:value="í" />
|
||||||
|
<String fx:value="ó" />
|
||||||
|
<String fx:value="ú" />
|
||||||
|
<String fx:value="ẃ" />
|
||||||
|
<String fx:value="ý" />
|
||||||
|
</FXCollections>
|
||||||
|
</items>
|
||||||
|
</ComboBox>
|
||||||
|
<ComboBox fx:id="specialChar4" onAction="#specialChar4" prefWidth="56.0" promptText="à" GridPane.columnIndex="3">
|
||||||
|
<items>
|
||||||
|
<FXCollections fx:factory="observableArrayList">
|
||||||
|
<String fx:value="à" />
|
||||||
|
<String fx:value="è" />
|
||||||
|
<String fx:value="ì" />
|
||||||
|
<String fx:value="ò" />
|
||||||
|
<String fx:value="ù" />
|
||||||
|
<String fx:value="ẁ" />
|
||||||
|
<String fx:value="ỳ" />
|
||||||
|
</FXCollections>
|
||||||
|
</items>
|
||||||
|
</ComboBox>
|
||||||
|
</children>
|
||||||
|
</GridPane>
|
||||||
|
</children>
|
||||||
</HBox>
|
</HBox>
|
||||||
<Text fx:id="typeOfTest" fill="#8d8d8d" strokeType="OUTSIDE" strokeWidth="0.0" text="Translation">
|
<Text fx:id="typeOfTest" fill="#8d8d8d" strokeType="OUTSIDE" strokeWidth="0.0" text="Translation">
|
||||||
<font>
|
<font>
|
||||||
|
|
Reference in a new issue