#297 Create unit test for PriceController
This commit is contained in:
parent
e80583fad7
commit
4ebb64c092
@ -40,6 +40,11 @@
|
|||||||
<artifactId>spring-boot-starter-web</artifactId>
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
<version>${spring-boot.version}</version>
|
<version>${spring-boot.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
@ -0,0 +1,15 @@
|
|||||||
|
package com.iluwatar.price.microservice;
|
||||||
|
|
||||||
|
import org.junit.Assert;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
public class PriceControllerTest {
|
||||||
|
@Test
|
||||||
|
public void testgetPrice() {
|
||||||
|
PriceController priceController = new PriceController();
|
||||||
|
|
||||||
|
String price = priceController.getPrice();
|
||||||
|
|
||||||
|
Assert.assertEquals("20", price);
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user