Fix tests
This commit is contained in:
parent
efdc50eb1d
commit
87bd780f9f
34 changed files with 230 additions and 303 deletions
|
|
@ -1,7 +1,5 @@
|
|||
package lu.foyer
|
||||
|
||||
import zio.schema.*
|
||||
|
||||
enum AppError(description: String) extends Throwable:
|
||||
enum AppError(description: String) extends Throwable(description):
|
||||
case NotFound(desc: String) extends AppError(desc)
|
||||
case Unexpected(desc: String) extends AppError(desc)
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
package lu.foyer
|
||||
|
||||
import zio.schema.*
|
||||
import java.util.UUID
|
||||
|
||||
opaque type ClientEntityId <: UUID = UUID
|
||||
object ClientEntityId extends RefinedUUID[ClientEntityId]
|
||||
opaque type ClientEntityId <: String = String
|
||||
object ClientEntityId extends NonBlankString[ClientEntityId]
|
||||
|
||||
opaque type Email <: String = String
|
||||
object Email extends NonBlankString[Email]
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
package lu.foyer
|
||||
|
||||
import zio.prelude.*
|
||||
import zio.schema.Schema
|
||||
|
||||
import java.time.LocalDate
|
||||
import java.util.UUID
|
||||
|
||||
import zio.prelude.*
|
||||
import zio.schema.Schema
|
||||
|
||||
trait RefinedType[Base, New]:
|
||||
inline def assume(value: Base): New = value.asInstanceOf[New]
|
||||
def validation(value: Base): Validation[String, New]
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
package lu.foyer
|
||||
package clients
|
||||
|
||||
import zio.schema.*
|
||||
|
||||
import java.time.Instant
|
||||
import java.time.LocalDate
|
||||
|
||||
import zio.schema.*
|
||||
|
||||
opaque type ClientLastName <: String = String
|
||||
object ClientLastName extends NonBlankString[ClientLastName]
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package lu.foyer
|
|||
package contracts
|
||||
|
||||
import zio.schema.*
|
||||
import java.util.Currency
|
||||
|
||||
opaque type EmployeeDisplayName <: String = String
|
||||
object EmployeeDisplayName extends NonBlankString[EmployeeDisplayName]
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
package lu.foyer
|
||||
package contracts
|
||||
|
||||
import zio.schema.*
|
||||
import java.util.Currency
|
||||
|
||||
import zio.schema.*
|
||||
|
||||
opaque type VehiclePlate <: String = String
|
||||
object VehiclePlate extends NonBlankString[VehiclePlate]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue