#297 Create unit test for ImageController
This commit is contained in:
@ -40,6 +40,11 @@
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
@ -58,12 +63,4 @@
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<!--<dependencies>-->
|
||||
<!--<dependency>-->
|
||||
<!--<groupId>junit</groupId>-->
|
||||
<!--<artifactId>junit</artifactId>-->
|
||||
<!--<scope>test</scope>-->
|
||||
<!--</dependency>-->
|
||||
<!--</dependencies>-->
|
||||
</project>
|
@ -0,0 +1,15 @@
|
||||
package com.iluwatar.image.microservice;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
public class ImageControllerTest {
|
||||
@Test
|
||||
public void testGetImagePath() {
|
||||
ImageController imageController = new ImageController();
|
||||
|
||||
String imagePath = imageController.getImagePath();
|
||||
|
||||
Assert.assertEquals("/product-image.png", imagePath);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user