package test
provides tools for testing your modelType and longevity context
- Source
- package.scala
Type Members
-
trait
ExerciseAkkaStreams[F[_], M, P] extends QuerySpec[F, M, P]
extends QuerySpec to add tests for AkkaStreamsRepo.queryToAkkaStream
extends QuerySpec to add tests for AkkaStreamsRepo.queryToAkkaStream
- F
the effect
- M
the model
- P
the persistent type
-
trait
ExerciseFS2[F[_], M, P] extends QuerySpec[F, M, P]
extends QuerySpec to add tests for FS2Repo.queryToFS2
extends QuerySpec to add tests for FS2Repo.queryToFS2
- F
the effect
- M
the model
- P
the persistent type
-
trait
ExerciseIterateeIo[F[_], M, P] extends QuerySpec[F, M, P]
extends QuerySpec to add tests for IterateeIoRepo.queryToIterateeIo
extends QuerySpec to add tests for IterateeIoRepo.queryToIterateeIo
- F
the effect
- M
the model
- P
the persistent type
-
trait
ExercisePlayEnumerator[F[_], M, P] extends QuerySpec[F, M, P]
extends QuerySpec to add tests for PlayRepo.queryToPlay
extends QuerySpec to add tests for PlayRepo.queryToPlay
- F
the effect
- M
the model
- P
the persistent type
-
trait
LongevityIntegrationSpec[F[_], M] extends Matchers with BeforeAndAfterAll
common code for longevity specs that use a longevity context with the test repo
common code for longevity specs that use a longevity context with the test repo
- F
the effect
- M
the model
-
abstract
class
QuerySpec[F[_], M, P] extends FlatSpec with LongevityIntegrationSpec[F, M]
contains common code for testing different Query instances against Repo.queryToVector, longevity.persistence.Repo.queryToIterator, and the four streaming query libraries:
contains common code for testing different Query instances against Repo.queryToVector, longevity.persistence.Repo.queryToIterator, and the four streaming query libraries:
- AkkaStreamsRepo.queryToAkkaStream
- FS2Repo.queryToFS2
- IterateeIoRepo.queryToIterateeIo
- PlayRepo.queryToPlay
pardon the nasty ScalaDocs for this class. we haven't figured out how to remove the methods inherited from ScalaTest classes yet.
- F
the effect
- M
the model
- P
the persistent type
-
class
RepoCrudSpec[F[_], M] extends FlatSpec with LongevityIntegrationSpec[F, M]
a ScalaTest fixture to test a Repo.
a ScalaTest fixture to test a Repo. instances of this test are provided in your LongevityContext via methods
repoCrudSpec
andinMemRepoCrudSpec
. these methods are added by an implicit conversion fromLongevityContext
to ScalaTestSpecs.the repo CRUD spec exercises create/retrieve/update/delete for all the persistent types in your repo.
pardon the nasty ScalaDocs for this class. we haven't figured out how to remove the methods inherited from ScalaTest classes yet.
to run a single tag in sbt:
test-only longevity.integration.subdomain.allAttributes.AllAttributesSpec -- -n Create
- F
the effect
- M
the model
-
trait
TestDataGenerator[M] extends AnyRef
generates test data for your domain model.
generates test data for your domain model. you can generate any persistent that occurs in your domain model by calling TestDataGenerator.generateP with the appropriate type parameter.