Skip to content
Snippets Groups Projects
Commit 138cf7bb authored by Nicolai Hollup Brand's avatar Nicolai Hollup Brand :penguin:
Browse files

Merge branch 'feat/create-textvalidation-tests' into test/more

parents a94750cd 7aa08a45
No related branches found
No related tags found
2 merge requests!31test: Playthrough, GoalFactory and TextValidation,!7Feat/part three
Pipeline #230232 passed
package edu.ntnu.idatt2001.group_30.paths.model.utils;
import javafx.scene.control.TextFormatter;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
class TextValidationTest {
@Test
void createIntegerTextFormatter_should_return_formatter_with_default_start_value() {
int expectedStartValue = 100;
TextFormatter<Integer> formatter = TextValidation.createIntegerTextFormatter();
Assertions.assertEquals(expectedStartValue, formatter.getValue());
}
@Test
void createIntegerTextFormatter_should_return_formatter_with_custom_start_value() {
int startValue = 50;
TextFormatter<Integer> formatter = TextValidation.createIntegerTextFormatter(startValue);
Assertions.assertEquals(startValue, formatter.getValue());
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment