use of org.molgenis.data.i18n.model.Language in project molgenis by molgenis.
the class LanguageRepositoryDecoratorTest method testDeleteById.
@Test(expectedExceptions = MolgenisDataException.class, expectedExceptionsMessageRegExp = MESSAGE_DELETE_NOT_ALLOWED)
public void testDeleteById() {
Language language = getMockLanguage(LANGUAGE_CODE_NL);
when(delegateRepository.findOneById(LANGUAGE_CODE_NL)).thenReturn(language);
languageRepositoryDecorator.deleteById(LANGUAGE_CODE_NL);
}
use of org.molgenis.data.i18n.model.Language in project molgenis by molgenis.
the class LanguageRepositoryDecoratorTest method testAddUnknownLanguage.
@Test(expectedExceptions = MolgenisDataException.class, expectedExceptionsMessageRegExp = MESSAGE_ADD_NOT_ALLOWED)
public void testAddUnknownLanguage() {
Language language = getMockLanguage("unknownLanguage");
languageRepositoryDecorator.add(Stream.of(language));
}
use of org.molgenis.data.i18n.model.Language in project molgenis by molgenis.
the class LanguageRepositoryDecoratorTest method testAddExistingLanguage.
@Test
public void testAddExistingLanguage() {
Language language = getMockLanguage(LANGUAGE_CODE_NL);
languageRepositoryDecorator.add(Stream.of(language));
verify(delegateRepository).add(language);
}
Aggregations