CustomerTest update, Gradle 6.4

This commit is contained in:
Bossanyi Tibor 2020-05-06 15:32:32 +02:00
parent 8bf529fe42
commit e4c5e8bd18
3 changed files with 5 additions and 18 deletions
gradle/wrapper
src/test/kotlin/com/aitrainer/api/test

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStorePath=wrapper/dists

View File

@ -1,13 +0,0 @@
package com.aitrainer.api.test
import org.junit.jupiter.api.Test
import org.springframework.boot.test.context.SpringBootTest
@SpringBootTest
class ApiApplicationTests {
@Test
fun contextLoads() {
}
}

View File

@ -19,10 +19,10 @@ class CustomerTests {
fun testInsert() {
val newCustomer = Customer("Bossanyi", "Tibor", "", 48, "m");
val savedCustomer: Customer = customerRepository.save(newCustomer)
assertEquals(savedCustomer?.age, 48)
assertEquals(savedCustomer.age, 48)
val customer: Customer? = customerRepository.findById( savedCustomer?.customer_id ).orElse(null);
assertEquals( customer?.firstname, "Tibor")
val customer: Customer = customerRepository.findById( savedCustomer.customer_id ).orElse(null);
assertEquals( customer.firstname, "Tibor")
//assertEquals( customer?.name, "Boss")
}