[skip ci] Fix Test for usage with processTestAot & refactor/linting

This commit is contained in:
Mirco 2024-07-09 09:06:14 +02:00
parent fbf5ca1cac
commit 76336077a2

View file

@ -5,12 +5,13 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
@SpringBootTest(classes = MainView.class)
public class MainViewTest {
@Test
void mainViewConstructor() {
MainView sut = new MainView("Harry,Sven,Ida");
CheckboxGroup cgroupTest = (CheckboxGroup) sut.getChildren().filter(child -> child instanceof CheckboxGroup).findAny().orElse(null);
assert cgroupTest != null;
int cgroupTestSelectedItemsSize = cgroupTest.getSelectedItems().size();
Assertions.assertEquals(3,cgroupTestSelectedItemsSize);
}