[skip ci] Fix Test for usage with processTestAot & refactor/linting
This commit is contained in:
parent
fbf5ca1cac
commit
76336077a2
1 changed files with 2 additions and 1 deletions
|
@ -5,12 +5,13 @@ import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
|
||||||
@SpringBootTest
|
@SpringBootTest(classes = MainView.class)
|
||||||
public class MainViewTest {
|
public class MainViewTest {
|
||||||
@Test
|
@Test
|
||||||
void mainViewConstructor() {
|
void mainViewConstructor() {
|
||||||
MainView sut = new MainView("Harry,Sven,Ida");
|
MainView sut = new MainView("Harry,Sven,Ida");
|
||||||
CheckboxGroup cgroupTest = (CheckboxGroup) sut.getChildren().filter(child -> child instanceof CheckboxGroup).findAny().orElse(null);
|
CheckboxGroup cgroupTest = (CheckboxGroup) sut.getChildren().filter(child -> child instanceof CheckboxGroup).findAny().orElse(null);
|
||||||
|
assert cgroupTest != null;
|
||||||
int cgroupTestSelectedItemsSize = cgroupTest.getSelectedItems().size();
|
int cgroupTestSelectedItemsSize = cgroupTest.getSelectedItems().size();
|
||||||
Assertions.assertEquals(3,cgroupTestSelectedItemsSize);
|
Assertions.assertEquals(3,cgroupTestSelectedItemsSize);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue