Search in sources :

Example 1 with ISettings

use of org.eclipse.dash.licenses.ISettings in project dash-licenses by eclipse.

the class CommandLineSettingsTest method testCustomLicenseCheckUrl.

@Test
void testCustomLicenseCheckUrl() {
    String url = "http://localhost/license.php";
    ISettings settings = CommandLineSettings.getSettings(new String[] { "-ef", url });
    assertEquals(url, settings.getLicenseCheckUrl());
}
Also used : ISettings(org.eclipse.dash.licenses.ISettings) Test(org.junit.jupiter.api.Test)

Example 2 with ISettings

use of org.eclipse.dash.licenses.ISettings in project dash-licenses by eclipse.

the class CommandLineSettingsTest method testCustomClearlyDefinedDefinitionsUrl.

@Test
void testCustomClearlyDefinedDefinitionsUrl() {
    String url = "http://localhost/license.php";
    ISettings settings = CommandLineSettings.getSettings(new String[] { "-cd", url });
    assertEquals(url, settings.getClearlyDefinedDefinitionsUrl());
}
Also used : ISettings(org.eclipse.dash.licenses.ISettings) Test(org.junit.jupiter.api.Test)

Example 3 with ISettings

use of org.eclipse.dash.licenses.ISettings in project dash-licenses by eclipse.

the class CommandLineSettingsTest method testCustomConfidence.

@Test
void testCustomConfidence() {
    ISettings settings = CommandLineSettings.getSettings(new String[] { "-confidence", "42" });
    assertEquals(42, settings.getConfidenceThreshold());
}
Also used : ISettings(org.eclipse.dash.licenses.ISettings) Test(org.junit.jupiter.api.Test)

Example 4 with ISettings

use of org.eclipse.dash.licenses.ISettings in project dash-licenses by eclipse.

the class CommandLineSettingsTest method testCustomBatchSize.

@Test
void testCustomBatchSize() {
    ISettings settings = CommandLineSettings.getSettings(new String[] { "-batch", "42" });
    assertEquals(42, settings.getBatchSize());
}
Also used : ISettings(org.eclipse.dash.licenses.ISettings) Test(org.junit.jupiter.api.Test)

Example 5 with ISettings

use of org.eclipse.dash.licenses.ISettings in project dash-licenses by eclipse.

the class CommandLineSettingsTest method testCustomApprovedLicensesUrl.

@Test
void testCustomApprovedLicensesUrl() {
    String url = "http://localhost/license.php";
    ISettings settings = CommandLineSettings.getSettings(new String[] { "-lic", url });
    assertEquals(url, settings.getApprovedLicensesUrl());
}
Also used : ISettings(org.eclipse.dash.licenses.ISettings) Test(org.junit.jupiter.api.Test)

Aggregations

ISettings (org.eclipse.dash.licenses.ISettings)8 Test (org.junit.jupiter.api.Test)7 Injector (com.google.inject.Injector)1 BufferedReader (java.io.BufferedReader)1 ByteArrayInputStream (java.io.ByteArrayInputStream)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 FileNotFoundException (java.io.FileNotFoundException)1 FileOutputStream (java.io.FileOutputStream)1 IOException (java.io.IOException)1 InputStreamReader (java.io.InputStreamReader)1 OutputStream (java.io.OutputStream)1 ArrayList (java.util.ArrayList)1 HashSet (java.util.HashSet)1 Artifact (org.apache.maven.artifact.Artifact)1 MojoExecutionException (org.apache.maven.plugin.MojoExecutionException)1 MojoFailureException (org.apache.maven.plugin.MojoFailureException)1 MavenProject (org.apache.maven.project.MavenProject)1 IContentId (org.eclipse.dash.licenses.IContentId)1 LicenseChecker (org.eclipse.dash.licenses.LicenseChecker)1 CSVCollector (org.eclipse.dash.licenses.cli.CSVCollector)1