Added JUnit dependency to run tests
This commit is contained in:
parent
4d4db1b153
commit
33984c4c0d
3 changed files with 10 additions and 3 deletions
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -22,11 +22,12 @@ public class DemoApplicationBuild extends BaseProject {
|
||||||
version(3,1,5)));
|
version(3,1,5)));
|
||||||
scope(test)
|
scope(test)
|
||||||
.include(dependency("org.springframework.boot", "spring-boot-starter-test",
|
.include(dependency("org.springframework.boot", "spring-boot-starter-test",
|
||||||
version(3,1,5)));
|
version(3,1,5)))
|
||||||
|
.include(dependency("org.junit.jupiter", "junit-jupiter",
|
||||||
|
version(5,10,0)));
|
||||||
|
|
||||||
testOperation().mainClass("com.example.demo.DemoApplicationTest");
|
testOperation().mainClass("com.example.demo.DemoApplicationTest");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
new DemoApplicationBuild().start(args);
|
new DemoApplicationBuild().start(args);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.example.demo;
|
package com.example.demo;
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
|
||||||
@SpringBootTest
|
@SpringBootTest
|
||||||
|
@ -9,5 +10,4 @@ class DemoApplicationTest {
|
||||||
@Test
|
@Test
|
||||||
void contextLoads() {
|
void contextLoads() {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue