use of net.sourceforge.pmd.ant.SourceLanguage in project pmd by pmd.
the class AbstractLanguageVersionTest method testFindVersionsForLanguageNameAndVersion.
/**
* Checks that the expected {@link LanguageVersion} can be found via
* {@link #name} and {@link #version}.
*/
@Test
public void testFindVersionsForLanguageNameAndVersion() {
SourceLanguage sourceLanguage = new SourceLanguage();
sourceLanguage.setName(name);
sourceLanguage.setVersion(version);
Language language = LanguageRegistry.getLanguage(sourceLanguage.getName());
LanguageVersion languageVersion = null;
if (language != null) {
languageVersion = language.getVersion(sourceLanguage.getVersion());
}
assertEquals(expected, languageVersion);
}
Aggregations