BAEL-2569 update test
This commit is contained in:
parent
bbb98f7a91
commit
a0227300bf
@ -1,8 +1,7 @@
|
|||||||
package com.baeldung.environmentpostprocessor;
|
package com.baeldung.environmentpostprocessor;
|
||||||
|
|
||||||
import static org.junit.Assert.assertTrue;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
|
||||||
import org.junit.Assert;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -14,16 +13,14 @@ import com.baeldung.environmentpostprocessor.service.PriceCalculationService;
|
|||||||
@RunWith(SpringRunner.class)
|
@RunWith(SpringRunner.class)
|
||||||
@SpringBootTest(classes = PriceCalculationApplication.class)
|
@SpringBootTest(classes = PriceCalculationApplication.class)
|
||||||
public class PriceCalculationEnvironmentPostProcessorLiveTest {
|
public class PriceCalculationEnvironmentPostProcessorLiveTest {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
PriceCalculationService pcService;
|
PriceCalculationService pcService;
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void WhenSetGrossEnvironmentVariable_ThenTaxApplied() {
|
public void whenSetNetEnvironmentVariablebyDefault_thenNoTaxApplied() {
|
||||||
double total = pcService.productTotalPrice(100, 4);
|
double total = pcService.productTotalPrice(100, 4);
|
||||||
|
assertEquals(400.0, total, 0);
|
||||||
Assert.assertEquals(400.0,total);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user