New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds tests for the FieldLister and FieldListerExpanded objects #102

Closed
fedefernandez opened this Issue Oct 23, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@fedefernandez
Contributor

fedefernandez commented Oct 23, 2017

We currently don't have any tests for FieldLister nor FieldListerExpanded entities. This code is covered because of a different feature that makes use of it is being tested, but we'd like to have proper tests for each specific feature.

FieldLister provides a way to list the column names for a case class. FieldListerExpanded works in a similar way but instead of returning the name of the fields that are case classes, it expands these case classes. For example:

case class Foo(fieldFoo1: String, fieldFoo2: Int, bar: Bar)
case class Bar(fieldBar1: Boolean, fieldBar2: Double)

val lister: FieldLister[Foo] = ???
lister.list // List("fieldFoo1", "fieldFoo2", "bar")

val expandedLister: FieldListerExpanded[Foo] = ???
expandedLister.list // List("fieldFoo1", "fieldFoo2", "fieldBar1", "fieldBar2")

The goal is to have at least an 80% of code coverage.

Code reference:
https://github.com/frees-io/freestyle-cassandra/blob/1a8f2f00db18c142df00bba20ee0d68838e139a8/core/src/main/scala/query/query.scala

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment