📍Use lombok, reformat, and optimize the code (#1560)

* Use lombok, reformat, and optimize the code

* Fix merge conflicts and some sonar issues

Co-authored-by: va1m <va1m@email.com>
This commit is contained in:
va1m
2021-03-13 13:19:21 +01:00
committed by GitHub
parent 0e26a6adb5
commit 5cf2fe009b
681 changed files with 2472 additions and 4966 deletions

View File

@@ -23,17 +23,20 @@
package com.iluwatar.separatedinterface.invoice;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import static org.mockito.Mockito.*;
public class InvoiceGeneratorTest {
class InvoiceGeneratorTest {
private InvoiceGenerator target;
@Test
public void testGenerateTax() {
void testGenerateTax() {
var productCost = 50.0;
var tax = 10.0;
TaxCalculator taxCalculatorMock = mock(TaxCalculator.class);

View File

@@ -26,16 +26,16 @@ package com.iluwatar.separatedinterface.taxes;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
public class DomesticTaxCalculatorTest {
class DomesticTaxCalculatorTest {
private DomesticTaxCalculator target;
@Test
public void testTaxCalculation(){
void testTaxCalculation() {
target = new DomesticTaxCalculator();
var tax=target.calculate(100.0);
Assertions.assertEquals(tax,20.0);
var tax = target.calculate(100.0);
Assertions.assertEquals(tax, 20.0);
}
}

View File

@@ -26,16 +26,16 @@ package com.iluwatar.separatedinterface.taxes;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
public class ForeignTaxCalculatorTest {
class ForeignTaxCalculatorTest {
private ForeignTaxCalculator target;
@Test
public void testTaxCalculation(){
void testTaxCalculation() {
target = new ForeignTaxCalculator();
var tax=target.calculate(100.0);
Assertions.assertEquals(tax,60.0);
var tax = target.calculate(100.0);
Assertions.assertEquals(tax, 60.0);
}
}