Remove nuxt + 100 other things..

This commit is contained in:
2020-07-08 19:46:04 +02:00
parent 3b80ae051d
commit 44b463d9d5
132 changed files with 6202 additions and 10961 deletions
@@ -0,0 +1,36 @@
package unit.validation
import be.vandewalleh.entities.User
import be.vandewalleh.validation.registerValidator
import org.amshove.kluent.*
import org.junit.jupiter.api.*
import utils.firstInvalid
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
class RegisterValidationTest {
@Test
fun `valid register test`() {
val violations = registerValidator.validate(
User {
username = "hubert"
password = "definitelyNotMyPassword"
}
)
violations.isValid `should be equal to` true
}
@Test
fun `username too long test`() {
val violations = registerValidator.validate(
User {
username = "6X9iboWmEOWjVjkO328ReTJ1gGPTTmB/ZGgBLhB6EzAJoWkJht8"
password = "definitelyNotMyPassword"
}
)
violations.isValid `should be equal to` false
violations.firstInvalid `should be equal to` "username"
}
}