Skip to content

Commit

Permalink
move the ConsulDiscoverable tests into another package to make sure n…
Browse files Browse the repository at this point in the history
…othing relies on them being in a specific place
  • Loading branch information
bpholt committed Oct 30, 2024
1 parent f2b70a3 commit 17e3598
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.dwolla.consul.smithy4s
package some_other_package

import com.dwolla.consul.smithy4s._
import com.dwolla.test.HelloService
import munit.FunSuite
import org.http4s.Uri
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.dwolla.consul.smithy4s
package some_other_package

import munit._

// TODO implement tests with macro-derived implementation once Scala 3 macro is available
trait ConsulDiscoverableSpecPerScalaVersion { self: FunSuite =>
test("ConsulDiscoverable typeclass macro returns no instance when the type parameter isn't a Smithy Service") {
assertEquals(
compileErrors("""ConsulDiscoverable[NotASmithy4sService]"""),
compileErrors("import com.dwolla.consul.smithy4s._\nConsulDiscoverable[NotASmithy4sService]"),
"""error: Instances are only available for Smithy4s Services annotated with @discoverable
|ConsulDiscoverable[NotASmithy4sService]
| ^""".stripMargin
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.dwolla.consul.smithy4s
package some_other_package

import munit._

Expand Down

0 comments on commit 17e3598

Please sign in to comment.