Skip to content

Commit

Permalink
create resources directory for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
don-bigdad committed Sep 18, 2023
1 parent 7b7503d commit 26cb543
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/main/java/core/basesyntax/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
import java.util.Map;

public class Main {
private static final String INPUT_FILE_PATH = "data.csv";
private static final String OUTPUT_FILE_PATH = "report.csv";
private static final String INPUT_FILE_PATH = "src/main/resources/data.csv";
private static final String OUTPUT_FILE_PATH = "src/main/resources/report.csv";
private static Map<FruitTransaction.Operation, OperationHandler> handlerMap;

static {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ void readFromNonExistFile_NotOk() {
void readFromExistFile_Ok() {
List<String> expected = List.of("type,fruit,quantity","b,banana,20",
"b,apple,100");
String existFile = "dataForTest.csv";
String existFile = "src/test/java/resources/dataForTest.csv";
List<String> actual = readerService.readFromFile(existFile);
Assertions.assertEquals(expected, actual);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

class OutputValidatorImplTest {
private final String invalidFileForTest = "OutputValidatorinValidTest.csv";
private final String invalidQuantityFile = "FileWithInvalidQuantity.csv";
private final String invalidQuantityFile = "resources/FileWithInvalidQuantity.csv";
private final OutputValidatorImpl outputValidator = new OutputValidatorImpl();

@Test
void fileValid_Ok() {
String validFileForTest = "OutputValidatorValidTest.csv";
String validFileForTest = "src/test/java/resources/OutputValidatorValidTest.csv";
outputValidator.validateFile(validFileForTest);
Assertions.assertTrue(outputValidator.validateFile(validFileForTest));
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 26cb543

Please sign in to comment.