#1313 Add Separated Interface design pattern

This commit is contained in:
swarajsaaj
2020-09-10 02:57:56 +05:30
parent ef326ee77e
commit f6942cf18d
13 changed files with 527 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
package com.iluwatar.separatedinterface.taxes;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
public class DomesticTaxTest {
private DomesticTax target;
@Test
public void testTaxCaluclation(){
target = new DomesticTax();
var tax=target.calculate(100.0);
Assertions.assertEquals(tax,20.0);
}
}

View File

@@ -0,0 +1,18 @@
package com.iluwatar.separatedinterface.taxes;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
public class ForeignTaxTest {
private ForeignTax target;
@Test
public void testTaxCaluclation(){
target = new ForeignTax();
var tax=target.calculate(100.0);
Assertions.assertEquals(tax,60.0);
}
}