Skip to content

Commit

Permalink
Fixed checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
HovorukhaBohdan committed Oct 26, 2023
1 parent 7aa30d9 commit d8e974e
Show file tree
Hide file tree
Showing 19 changed files with 45 additions and 45 deletions.
13 changes: 10 additions & 3 deletions src/main/java/core/basesyntax/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,21 @@

import core.basesyntax.model.FruitTransaction;
import core.basesyntax.model.Operation;
import core.basesyntax.service.*;
import core.basesyntax.service.impl.*;
import core.basesyntax.service.CreateReportService;
import core.basesyntax.service.DataConvertService;
import core.basesyntax.service.DataProcessService;
import core.basesyntax.service.ReadFromCsvFileService;
import core.basesyntax.service.WriteToCsvFileService;
import core.basesyntax.service.impl.CreateReportServiceImpl;
import core.basesyntax.service.impl.DataConvertServiceImpl;
import core.basesyntax.service.impl.DataProcessServiceImpl;
import core.basesyntax.service.impl.ReadFromCsvFileServiceImpl;
import core.basesyntax.service.impl.WriteToCsvFileServiceImpl;
import core.basesyntax.strategy.OperationHandler;
import core.basesyntax.strategy.impl.BalanceOperationHandlerImpl;
import core.basesyntax.strategy.impl.PurchaseOperationHandlerImpl;
import core.basesyntax.strategy.impl.ReturnOperationHandlerImpl;
import core.basesyntax.strategy.impl.SupplyOperationHandlerImpl;

import java.util.List;
import java.util.Map;

Expand Down
1 change: 0 additions & 1 deletion src/main/java/core/basesyntax/db/dao/StorageDaoImpl.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package core.basesyntax.db.dao;

import core.basesyntax.db.Storage;

import java.util.Map;

public class StorageDaoImpl implements StorageDao {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package core.basesyntax.service;

import core.basesyntax.model.FruitTransaction;

import java.util.List;

public interface DataConvertService {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package core.basesyntax.service;

import core.basesyntax.model.FruitTransaction;

import java.util.List;

public interface DataProcessService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import core.basesyntax.db.dao.StorageDao;
import core.basesyntax.db.dao.StorageDaoImpl;
import core.basesyntax.service.CreateReportService;

import java.util.Map;

public class CreateReportServiceImpl implements CreateReportService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import core.basesyntax.model.FruitTransaction;
import core.basesyntax.model.Operation;
import core.basesyntax.service.DataConvertService;

import java.util.ArrayList;
import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import core.basesyntax.strategy.FruitOperationStrategy;
import core.basesyntax.strategy.OperationHandler;
import core.basesyntax.strategy.impl.FruitOperationStrategyImpl;

import java.util.List;
import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package core.basesyntax.service.impl;

import core.basesyntax.service.ReadFromCsvFileService;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package core.basesyntax.service.impl;

import core.basesyntax.service.WriteToCsvFileService;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import core.basesyntax.model.Operation;
import core.basesyntax.strategy.FruitOperationStrategy;
import core.basesyntax.strategy.OperationHandler;

import java.util.Map;

public class FruitOperationStrategyImpl implements FruitOperationStrategy {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@
import core.basesyntax.service.DataConvertService;
import core.basesyntax.service.DataProcessService;
import core.basesyntax.service.ReadFromCsvFileService;
import java.util.Map;

import core.basesyntax.strategy.OperationHandler;
import core.basesyntax.strategy.impl.BalanceOperationHandlerImpl;
import core.basesyntax.strategy.impl.PurchaseOperationHandlerImpl;
import core.basesyntax.strategy.impl.ReturnOperationHandlerImpl;
import core.basesyntax.strategy.impl.SupplyOperationHandlerImpl;
import java.util.Map;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@
import core.basesyntax.service.DataConvertService;
import core.basesyntax.service.DataProcessService;
import core.basesyntax.service.ReadFromCsvFileService;
import java.util.List;
import java.util.Map;

import core.basesyntax.strategy.OperationHandler;
import core.basesyntax.strategy.impl.BalanceOperationHandlerImpl;
import core.basesyntax.strategy.impl.PurchaseOperationHandlerImpl;
import core.basesyntax.strategy.impl.ReturnOperationHandlerImpl;
import core.basesyntax.strategy.impl.SupplyOperationHandlerImpl;
import java.util.List;
import java.util.Map;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package core.basesyntax.service.impl;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThrows;

import core.basesyntax.db.Storage;
import core.basesyntax.model.Operation;
import core.basesyntax.service.DataConvertService;
Expand All @@ -9,14 +12,11 @@
import core.basesyntax.strategy.impl.PurchaseOperationHandlerImpl;
import core.basesyntax.strategy.impl.ReturnOperationHandlerImpl;
import core.basesyntax.strategy.impl.SupplyOperationHandlerImpl;
import java.util.Map;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

import java.util.Map;

import static org.junit.jupiter.api.Assertions.*;

class DataProcessServiceImplTest {
private static final String FIRST_FILENAME = "fruits1.csv";
private static final String SECOND_FILENAME = "fruits2.csv";
Expand Down Expand Up @@ -71,7 +71,8 @@ void dataProcessor_fourFruits_Ok() {
@Test
void dataProcessor_lessThenZero_NotOk() {
assertThrows(RuntimeException.class, () ->
processor.processFruits(convertor.convert(reader.readFile(LESS_THEN_ZERO_FILENAME))));
processor.processFruits(convertor.convert(
reader.readFile(LESS_THEN_ZERO_FILENAME))));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@
import core.basesyntax.service.DataProcessService;
import core.basesyntax.service.ReadFromCsvFileService;
import core.basesyntax.service.WriteToCsvFileService;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.Map;

import core.basesyntax.strategy.OperationHandler;
import core.basesyntax.strategy.impl.BalanceOperationHandlerImpl;
import core.basesyntax.strategy.impl.PurchaseOperationHandlerImpl;
import core.basesyntax.strategy.impl.ReturnOperationHandlerImpl;
import core.basesyntax.strategy.impl.SupplyOperationHandlerImpl;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.Map;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package core.basesyntax.strategy.impl;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThrows;

import core.basesyntax.model.FruitTransaction;
import core.basesyntax.model.Operation;
import core.basesyntax.strategy.OperationHandler;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.*;

class BalanceOperationHandlerImplTest {
private static final int NORMAL_VALUE = 10;
private static final int ZERO_VALUE = 0;
Expand Down Expand Up @@ -44,6 +45,6 @@ void balanceOperationHandler_zeroValue_Ok() {
@Test
void balanceOperationHandler_lessThenZero_NotOk() {
assertThrows(RuntimeException.class, () ->
balanceHandler.count(LESS_THEN_ZERO_TRANSACTION));
balanceHandler.count(LESS_THEN_ZERO_TRANSACTION));
}
}
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package core.basesyntax.strategy.impl;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThrows;

import core.basesyntax.model.FruitTransaction;
import core.basesyntax.model.Operation;
import core.basesyntax.strategy.FruitOperationStrategy;
import core.basesyntax.strategy.OperationHandler;
import java.util.Map;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

import java.util.Map;

import static org.junit.jupiter.api.Assertions.*;

class FruitOperationStrategyImplTest {
private static final int NORMAL_VALUE = 10;
private static final int ZERO_VALUE = 0;
Expand Down Expand Up @@ -138,4 +138,4 @@ void strategyReturn_lessThenZero_NotOk() {
assertThrows(RuntimeException.class, () ->
fruitStrategy.countFruits(LESS_THEN_ZERO_RETURN_TRANSACTION));
}
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package core.basesyntax.strategy.impl;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThrows;

import core.basesyntax.model.FruitTransaction;
import core.basesyntax.model.Operation;
import core.basesyntax.strategy.OperationHandler;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.*;

class PurchaseOperationHandlerImplTest {
private static final int NORMAL_VALUE = 10;
private static final int ZERO_VALUE = 0;
Expand Down Expand Up @@ -46,4 +47,4 @@ void purchaseOperationHandler_lessThenZero_NotOk() {
assertThrows(RuntimeException.class, () ->
purchaseHandler.count(LESS_THEN_ZERO_TRANSACTION));
}
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package core.basesyntax.strategy.impl;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThrows;

import core.basesyntax.model.FruitTransaction;
import core.basesyntax.model.Operation;
import core.basesyntax.strategy.OperationHandler;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.*;

class ReturnOperationHandlerImplTest {
private static final int NORMAL_VALUE = 10;
private static final int ZERO_VALUE = 0;
Expand Down Expand Up @@ -46,4 +47,4 @@ void balanceOperationHandler_lessThenZero_NotOk() {
assertThrows(RuntimeException.class, () ->
returnHandler.count(LESS_THEN_ZERO_TRANSACTION));
}
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package core.basesyntax.strategy.impl;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThrows;

import core.basesyntax.model.FruitTransaction;
import core.basesyntax.model.Operation;
import core.basesyntax.strategy.OperationHandler;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.*;

class SupplyOperationHandlerImplTest {
private static final int NORMAL_VALUE = 10;
private static final int ZERO_VALUE = 0;
Expand Down Expand Up @@ -46,4 +47,4 @@ void balanceOperationHandler_lessThenZero_NotOk() {
assertThrows(RuntimeException.class, () ->
supplyHandler.count(LESS_THEN_ZERO_TRANSACTION));
}
}
}

0 comments on commit d8e974e

Please sign in to comment.