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

@ -5,9 +5,12 @@ plugins {
}
jar {
archivesBaseName='time-series-smoothing'
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,14 +33,15 @@ 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.slf4j', name: 'slf4j-api', version: versionSLF4J
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'
implementation group: 'org.eclipse.jetty', name: 'jetty-servlet', version: versionJetty
implementation group: 'org.eclipse.jetty', name: 'jetty-servlet', version: versionJetty
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations'
implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations'
implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310'
implementation group: 'org.springdoc', name: 'springdoc-openapi-ui', version: '1.6.5'
@ -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++) {