Skip to content

Instantly share code, notes, and snippets.

@TomDeMille
Created April 19, 2016 15:21
Show Gist options
  • Select an option

  • Save TomDeMille/c9865e6ff8b3f8c1498726ed703a5cdf to your computer and use it in GitHub Desktop.

Select an option

Save TomDeMille/c9865e6ff8b3f8c1498726ed703a5cdf to your computer and use it in GitHub Desktop.
Scala Test Utils for Contact Service (Boomtown)
package com.boomtownroi.services.contact
import com.boomtownroi.services.contact.db.{Contacts, SortBy}
import scala.concurrent.Await
import scala.concurrent.duration.Duration
/**
* Created by tdemille on 4/19/16.
* can run from sbt console like this
* > import com.boomtownroi.services.contact.tgdDriver
* > tgdDriver.emailTest
*/
object tgdDriver extends App {
def emailTest() = {
val r = Await.result(Contacts.getSmallContacts(0, 80, SortBy.parse("lastName Desc")), Duration(10, "seconds"))
r.foreach(c =>
{
println(s"Contact with ID ${c.contactId} and name ${c.firstName.get} ${c.lastName.get}")
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment