Skip to content

Commit

Permalink
Corrected a typo in class name
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-molak committed Dec 6, 2023
1 parent f54b35e commit 0eeba61
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import net.serenitybdd.reports.asciidoc.templates.FreemarkerTemplateEngine
import net.thucydides.model.reports.OutcomeFormat
import net.thucydides.model.reports.TestOutcomeLoader
import net.thucydides.model.reports.TestOutcomes
import net.thucydides.model.requirements.reports.FileSystemRequirmentsOutcomeFactory
import net.thucydides.model.requirements.reports.FileSystemRequirementsOutcomeFactory
import net.thucydides.model.requirements.reports.RequirementsOutcomes
import net.thucydides.model.util.EnvironmentVariables
import java.io.File
Expand Down Expand Up @@ -82,6 +82,6 @@ class AsciidocReporter(val environmentVariables: EnvironmentVariables) {

class RequirementsOutcomesProvider(val testOutcomes: TestOutcomes) {
fun using(environmentVariables: EnvironmentVariables): RequirementsOutcomes =
FileSystemRequirmentsOutcomeFactory(environmentVariables).buildRequirementsOutcomesFrom(testOutcomes)
FileSystemRequirementsOutcomeFactory(environmentVariables).buildRequirementsOutcomesFrom(testOutcomes)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package net.serenitybdd.reports.asciidoc
import net.thucydides.model.reports.OutcomeFormat
import net.thucydides.model.reports.TestOutcomeLoader
import net.thucydides.model.requirements.FileSystemRequirementsTagProvider
import net.thucydides.model.requirements.reports.FileSystemRequirmentsOutcomeFactory
import net.thucydides.model.requirements.reports.FileSystemRequirementsOutcomeFactory
import net.thucydides.model.util.EnvironmentVariables
import net.thucydides.model.util.MockEnvironmentVariables
import org.assertj.core.api.Assertions.assertThat
Expand Down Expand Up @@ -39,7 +39,7 @@ class WhenLoadingRequirementsOutcomes {
.inFormat(OutcomeFormat.JSON)
.from(File("src/test/resources/test_outcomes/with_a_single_test"))

val outcomesFactory = FileSystemRequirmentsOutcomeFactory(environmentVariables)
val outcomesFactory = FileSystemRequirementsOutcomeFactory(environmentVariables)
val requirementsOutcomes = outcomesFactory.buildRequirementsOutcomesFrom(testOutcomes)
assertThat(requirementsOutcomes.requirementCount).isEqualTo(3)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
import net.serenitybdd.model.environment.ConfiguredEnvironment;
import net.thucydides.model.domain.ReportType;
import net.thucydides.model.reports.html.ReportNameProvider;
import net.thucydides.model.requirements.reports.FileSystemRequirmentsOutcomeFactory;
import net.thucydides.model.requirements.reports.FileSystemRequirementsOutcomeFactory;
import net.thucydides.model.requirements.reports.RequirementsOutcomeFactory;

import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;

import static net.thucydides.model.reports.html.ReportNameProvider.NO_CONTEXT;
Expand All @@ -26,10 +25,10 @@ public AggregateRequirements(Path jsonOutcomes, String featureFilesDirectory) {
ModelInfrastructure.getEnvironmentVariables(),
new FileSystemRequirementsTagProvider(featureFilesDirectory),
new TestOutcomeRequirementsTagProvider().fromSourceDirectory(jsonOutcomes));
this.requirmentsOutcomeFactory = new FileSystemRequirmentsOutcomeFactory(
this.requirmentsOutcomeFactory = new FileSystemRequirementsOutcomeFactory(
ConfiguredEnvironment.getEnvironmentVariables(),
ModelInfrastructure.getIssueTracking(),
new ReportNameProvider(NO_CONTEXT, ReportType.HTML, getRequirementsService()),
new ReportNameProvider(NO_CONTEXT, ReportType.HTML, requirementsService),
featureFilesDirectory);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import net.serenitybdd.model.environment.ConfiguredEnvironment;
import net.thucydides.model.domain.ReportType;
import net.thucydides.model.reports.html.ReportNameProvider;
import net.thucydides.model.requirements.reports.FileSystemRequirmentsOutcomeFactory;
import net.thucydides.model.requirements.reports.FileSystemRequirementsOutcomeFactory;
import net.thucydides.model.requirements.reports.RequirementsOutcomeFactory;

import java.util.List;
Expand All @@ -21,7 +21,7 @@ public class FileSystemRequirements implements Requirements {

public FileSystemRequirements(String path) {
this.requirementsService = new FileSystemRequirementsService(path);
this.requirmentsOutcomeFactory = new FileSystemRequirmentsOutcomeFactory(
this.requirmentsOutcomeFactory = new FileSystemRequirementsOutcomeFactory(
ConfiguredEnvironment.getEnvironmentVariables(),
ModelInfrastructure.getIssueTracking(),
new ReportNameProvider(NO_CONTEXT, ReportType.HTML, getRequirementsService()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,34 @@

import java.util.List;

public class FileSystemRequirmentsOutcomeFactory implements RequirementsOutcomeFactory {
public class FileSystemRequirementsOutcomeFactory implements RequirementsOutcomeFactory {

private final IssueTracking issueTracking;
private final EnvironmentVariables environmentVariables;
private final FileSystemRequirementsTagProvider tagProvider;
private final ReportNameProvider reportNameProvider;

private static final Logger LOGGER = LoggerFactory.getLogger(FileSystemRequirmentsOutcomeFactory.class);
private static final Logger LOGGER = LoggerFactory.getLogger(FileSystemRequirementsOutcomeFactory.class);

public FileSystemRequirmentsOutcomeFactory(EnvironmentVariables environmentVariables) {
public FileSystemRequirementsOutcomeFactory(EnvironmentVariables environmentVariables) {
this(environmentVariables,
new SystemPropertiesIssueTracking(),
new ReportNameProvider());
}

public FileSystemRequirmentsOutcomeFactory(EnvironmentVariables environmentVariables,
IssueTracking issueTracking,
ReportNameProvider reportNameProvider) {
public FileSystemRequirementsOutcomeFactory(EnvironmentVariables environmentVariables,
IssueTracking issueTracking,
ReportNameProvider reportNameProvider) {
this.issueTracking = issueTracking;
this.environmentVariables = environmentVariables;
this.tagProvider = new FileSystemRequirementsTagProvider(environmentVariables);
this.reportNameProvider = reportNameProvider;
}

public FileSystemRequirmentsOutcomeFactory(EnvironmentVariables environmentVariables,
IssueTracking issueTracking,
ReportNameProvider reportNameProvider,
String rootDirectoryPath) {
public FileSystemRequirementsOutcomeFactory(EnvironmentVariables environmentVariables,
IssueTracking issueTracking,
ReportNameProvider reportNameProvider,
String rootDirectoryPath) {
this.issueTracking = issueTracking;
this.environmentVariables = environmentVariables;
this.tagProvider = new FileSystemRequirementsTagProvider(environmentVariables, rootDirectoryPath);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import static org.junit.jupiter.api.Assertions.*;
class FileSystemRequirmentsOutcomeFactoryTest {

}

0 comments on commit 0eeba61

Please sign in to comment.