Skip to content

Commit

Permalink
Add langs to test
Browse files Browse the repository at this point in the history
  • Loading branch information
derkoe committed Nov 4, 2022
1 parent dad2fe6 commit df07e43
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public void checkSpdxAndCombinationNotAllowed()
Dependency thing = new Dependency("thing", "1.0", "(Apache-2.0 AND MIT)");
thing.setInputComponent(context.project());
validateLicenses.validateLicenses(
deps(new Dependency("another", "2.0", "LGPL"), thing),
deps(new Dependency("another", "2.0", "LGPL", LicenseCheckRulesDefinition.LANG_JAVA), thing),
context);

verify(context).newIssue();
Expand All @@ -153,7 +153,7 @@ public void checkSpdxAndCombinationNotFound()
NewIssue issue = new DefaultIssue(mock(DefaultInputProject.class), mock(SensorStorage.class));
when(context.newIssue()).thenReturn(issue);

Dependency thing = new Dependency("thing", "1.0", "(Apache-2.0 AND Apache-1.1)");
Dependency thing = new Dependency("thing", "1.0", "(Apache-2.0 AND Apache-1.1)", LicenseCheckRulesDefinition.LANG_KOTLIN);
thing.setInputComponent(context.project());
validateLicenses.validateLicenses(deps(thing), context);

Expand All @@ -180,7 +180,7 @@ public void licenseNull()
NewIssue issue = new DefaultIssue(mock(DefaultInputProject.class), mock(SensorStorage.class));
when(context.newIssue()).thenReturn(issue);

Dependency thing = new Dependency("thing", "1.0", null);
Dependency thing = new Dependency("thing", "1.0", null, LicenseCheckRulesDefinition.LANG_JS);
thing.setInputComponent(context.project());
validateLicenses.validateLicenses(deps(thing), context);

Expand Down

0 comments on commit df07e43

Please sign in to comment.