Adding AddWordControllerTest again

added a method for luke to look at :)
This commit is contained in:
Henry Dugmore 2020-04-29 16:59:45 +01:00
parent cd083bcd1b
commit b290e0faa1

View file

@ -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());
}
}