fix tests
This commit is contained in:
parent
af34fc9258
commit
0c92564bdb
14
build.gradle
14
build.gradle
@ -31,16 +31,12 @@ dependencies {
|
|||||||
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-jetty'
|
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-jetty'
|
||||||
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-thymeleaf'
|
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-thymeleaf'
|
||||||
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-validation'
|
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-validation'
|
||||||
|
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-test'
|
||||||
implementation group: 'org.slf4j', name: 'slf4j-api', version: versionSLF4J
|
implementation group: 'org.slf4j', name: 'slf4j-api', version: versionSLF4J
|
||||||
implementation group: 'nz.net.ultraq.thymeleaf', name: 'thymeleaf-layout-dialect', version: '3.1.0'
|
implementation group: 'nz.net.ultraq.thymeleaf', name: 'thymeleaf-layout-dialect', version: '3.1.0'
|
||||||
|
|
||||||
testImplementation group: 'org.powermock', name: 'powermock-module-junit4', version: '1.7.4'
|
implementation group: 'org.powermock', name: 'powermock-module-junit4', version: '1.7.4'
|
||||||
testImplementation group: 'org.powermock', name: 'powermock-api-mockito', version: '1.7.4'
|
implementation group: 'org.powermock', name: 'powermock-api-mockito', version: '1.7.4'
|
||||||
testImplementation group: 'org.powermock', name: 'powermock-api-mockito-common', version: '1.7.4'
|
implementation group: 'org.powermock', name: 'powermock-api-mockito-common', version: '1.7.4'
|
||||||
testImplementation group: 'org.mockito', name: 'mockito-all', version: '1.10.19'
|
implementation group: 'org.mockito', name: 'mockito-all', version: '1.10.19'
|
||||||
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test'
|
|
||||||
}
|
|
||||||
|
|
||||||
test {
|
|
||||||
useJUnitPlatform()
|
|
||||||
}
|
}
|
8
src/main/resources/config.properties
Normal file
8
src/main/resources/config.properties
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# Possible values: file or db
|
||||||
|
targetStorage=file
|
||||||
|
fileStorage=test-users.json
|
||||||
|
dbHost=localhost
|
||||||
|
dbName=unit-test
|
||||||
|
dbPort=5432
|
||||||
|
dbUser=postgres
|
||||||
|
dbPassword=postgres
|
@ -1,3 +1,5 @@
|
|||||||
|
package ru.ulstu;
|
||||||
|
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
@ -1,3 +1,5 @@
|
|||||||
|
package ru.ulstu;
|
||||||
|
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
@ -1,8 +1,9 @@
|
|||||||
|
package ru.ulstu;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.mockito.Mock;
|
import org.mockito.Mock;
|
||||||
import org.mockito.Mockito;
|
import org.mockito.Mockito;
|
||||||
import org.powermock.api.mockito.PowerMockito;
|
import org.powermock.api.mockito.PowerMockito;
|
||||||
import ru.ulstu.UserService;
|
|
||||||
import ru.ulstu.entity.User;
|
import ru.ulstu.entity.User;
|
||||||
import ru.ulstu.exception.UserNotValidException;
|
import ru.ulstu.exception.UserNotValidException;
|
||||||
import ru.ulstu.persistence.FileStore;
|
import ru.ulstu.persistence.FileStore;
|
Loading…
Reference in New Issue
Block a user