Skip to content

Instantly share code, notes, and snippets.

@wololock
Created October 29, 2019 20:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wololock/00485ddccf5e90f0da9e7512cf8dff47 to your computer and use it in GitHub Desktop.
Save wololock/00485ddccf5e90f0da9e7512cf8dff47 to your computer and use it in GitHub Desktop.
package com.github.wololock.micronaut.products
import io.micronaut.context.annotation.Property
import io.micronaut.test.annotation.MicronautTest
import spock.lang.Specification
@MicronautTest(environments = ["test"])
class ProductSpec extends Specification {
@Property(name = "items")
List<String> items
def "should use default items"() {
expect:
items == ["Item 1", "Item 2"]
}
@Property(name = "items", value = "Item 3,Item 4,Item 5")
def "should override default items"() {
expect:
items == ["Item 3", "Item 4", "Item 5"]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment