fix tests

This commit is contained in:
Anton Romanov 2023-01-08 15:17:02 +04:00
parent 1dbf7defeb
commit 0460d422b2
2 changed files with 18 additions and 10 deletions

View File

@ -8,6 +8,9 @@ jar {
archivesBaseName = 'time-series-smoothing'
}
group 'ru.ulstu'
version '1.0-SNAPSHOT'
repositories {
maven {
url "https://repo.athene.tech/repository/maven-central/"
@ -17,8 +20,9 @@ repositories {
}
}
sourceCompatibility = '11'
targetCompatibility = '11'
test {
useJUnitPlatform()
}
dependencies {
ext {
@ -29,6 +33,7 @@ dependencies {
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web'
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-test'
implementation group: 'org.slf4j', name: 'slf4j-api', version: versionSLF4J
implementation group: 'nz.net.ultraq.thymeleaf', name: 'thymeleaf-layout-dialect', version: '3.0.0'
implementation group: 'org.javassist', name: 'javassist', version: '3.25.0-GA'
@ -46,7 +51,8 @@ dependencies {
implementation group: 'org.webjars', name: 'font-awesome', version: '4.7.0'
implementation group: 'org.webjars', name: 'highcharts', version: '7.0.0'
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
}

View File

@ -1,6 +1,7 @@
package ru.ulstu;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import ru.ulstu.TimeSeriesUtils;
import ru.ulstu.datamodel.ts.TimeSeries;
import ru.ulstu.datamodel.ts.TimeSeriesValue;
import ru.ulstu.statistic.StatisticService;
@ -8,6 +9,7 @@ import ru.ulstu.statistic.StatisticService;
import java.time.LocalDateTime;
public class StatisticServiceTest {
private TimeSeries getTimeSeries() {
TimeSeries ts = new TimeSeries();
for (int i = 0; i < 11; i++) {