From fc2f37b4a3c22747d0e913a2b7a379dbe7e9e7d1 Mon Sep 17 00:00:00 2001 From: vlad Date: Fri, 20 Oct 2017 14:17:05 -0700 Subject: Slick support for any Refined types, JSON format and generator for NonEmptyName, Unit-tests --- src/test/scala/xyz/driver/core/GeneratorsTest.scala | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/test/scala/xyz/driver/core/GeneratorsTest.scala') diff --git a/src/test/scala/xyz/driver/core/GeneratorsTest.scala b/src/test/scala/xyz/driver/core/GeneratorsTest.scala index 737cbcb..62ba7ae 100644 --- a/src/test/scala/xyz/driver/core/GeneratorsTest.scala +++ b/src/test/scala/xyz/driver/core/GeneratorsTest.scala @@ -44,6 +44,11 @@ class GeneratorsTest extends FlatSpec with Matchers with Assertions { assert(!fixedLengthName.value.exists(_.isControl)) } + it should "be able to generate com.drivergrp.core.NonEmptyName with non empty strings" in { + + assert(nextNonEmptyName[String]().value.value.nonEmpty) + } + it should "be able to generate proper UUIDs" in { nextUuid() should not be nextUuid() @@ -66,6 +71,11 @@ class GeneratorsTest extends FlatSpec with Matchers with Assertions { assert(!fixedLengthString.exists(_.isControl)) } + it should "be able to generate strings non-empty strings whic are non empty" in { + + assert(nextNonEmptyString().value.nonEmpty) + } + it should "be able to generate options which are sometimes have values and sometimes not" in { val generatedOption = nextOption("2") -- cgit v1.2.3