-
-
Notifications
You must be signed in to change notification settings - Fork 723
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
5 changed files
with
67 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 0 additions & 24 deletions
24
allure-commandline/src/main/java/io/qameta/allure/validator/DirectoryExistsValidator.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
allure-generator/src/test/java/io/qameta/allure/EmptyResultsTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package io.qameta.allure; | ||
|
||
import io.qameta.allure.core.Configuration; | ||
import org.junit.Rule; | ||
import org.junit.Test; | ||
import org.junit.rules.TemporaryFolder; | ||
|
||
import java.nio.file.Path; | ||
|
||
/** | ||
* @author charlie (Dmitry Baev). | ||
*/ | ||
public class EmptyResultsTest { | ||
|
||
@Rule | ||
public TemporaryFolder folder = new TemporaryFolder(); | ||
|
||
@Test | ||
public void shouldAllowEmptyResultsDirectory() throws Exception { | ||
final Path resultsDirectory = folder.newFolder().toPath(); | ||
final Path outputDirectory = folder.newFolder().toPath(); | ||
final Configuration configuration = new ConfigurationBuilder().useDefault().build(); | ||
final ReportGenerator generator = new ReportGenerator(configuration); | ||
|
||
generator.generate(outputDirectory, resultsDirectory); | ||
} | ||
|
||
@Test | ||
public void shouldAllowNonExistsResultsDirectory() throws Exception { | ||
final Path resultsDirectory = folder.newFolder().toPath().resolve("some-dir"); | ||
final Path outputDirectory = folder.newFolder().toPath(); | ||
final Configuration configuration = new ConfigurationBuilder().useDefault().build(); | ||
final ReportGenerator generator = new ReportGenerator(configuration); | ||
|
||
generator.generate(outputDirectory, resultsDirectory); | ||
} | ||
|
||
@Test | ||
public void shouldAllowRegularFileAsResultsDirectory() throws Exception { | ||
final Path resultsDirectory = folder.newFile().toPath(); | ||
final Path outputDirectory = folder.newFolder().toPath(); | ||
final Configuration configuration = new ConfigurationBuilder().useDefault().build(); | ||
final ReportGenerator generator = new ReportGenerator(configuration); | ||
|
||
generator.generate(outputDirectory, resultsDirectory); | ||
} | ||
} |