Adding AddWordControllerTest again
added a method for luke to look at :)
This commit is contained in:
parent
cd083bcd1b
commit
b290e0faa1
1 changed files with 50 additions and 0 deletions
|
@ -0,0 +1,50 @@
|
|||
package uk.ac.aber.cs22120.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.cs22120.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());
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
Reference in a new issue