diff --git a/src/test/java/org/tdl/vireo/model/ControlledVocabularyTest.java b/src/test/java/org/tdl/vireo/model/ControlledVocabularyTest.java new file mode 100644 index 000000000..03eb9d593 --- /dev/null +++ b/src/test/java/org/tdl/vireo/model/ControlledVocabularyTest.java @@ -0,0 +1,42 @@ +package org.tdl.vireo.model; + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Stream; +import org.junit.jupiter.params.provider.Arguments; +import org.mockito.InjectMocks; + +public class ControlledVocabularyTest extends AbstractModelTest { + + @InjectMocks + private ControlledVocabulary controlledVocabulary; + + @Override + protected ControlledVocabulary getInstance() { + return controlledVocabulary; + } + + protected static Stream provideGetterParameters() { + return getParameterStream(); + } + + protected static Stream provideSetterParameters() { + return getParameterStream(); + } + + private static Stream getParameterStream() { + List dictionary = new ArrayList<>(); + VocabularyWord vocabularyWord = new VocabularyWord(); + + vocabularyWord.setId(1L); + dictionary.add(vocabularyWord); + + return Stream.of( + Arguments.of("name", "value"), + //Arguments.of("dictionary", dictionary), // FIXME: This is failing on NPE. + Arguments.of("isEntityProperty", true), + Arguments.of("isEntityProperty", false) + ); + } + +}