Skip to content
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

Unable to run tests from IntelliJ #20

Open
psriramula opened this issue Dec 30, 2018 · 2 comments
Open

Unable to run tests from IntelliJ #20

psriramula opened this issue Dec 30, 2018 · 2 comments

Comments

@psriramula
Copy link

Tests are not executable from IntelliJ.

@psriramula
Copy link
Author

Unable to run the tests from IntelliJ, though running from sbt

Also, your quick example not working from a Scala Worksheet.

@psriramula
Copy link
Author

import argus.macros._
import io.circe._
import io.circe.syntax._

@fromSchemaResource("/simple.json", name="Person")
object Schema
import Schema._
import Schema.Implicits._

val json = """
|{
| "name" : ["Bob", "Smith"],
| "age" : 26,
| "address" : {
| "number" : 31,
| "street" : "Main St"
| },
| "erdosNumber": 123
|}
""".stripMargin

// Decode into generated case class
val person = parser.decodePerson.toOption.get

// Update address
val address = Address(number=Some(42), street=Some("Alt St"))
val newPerson = person.copy(address=Some(address))

// Encode base to json
newPerson.asJson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant