mirror of
https://github.com/jlengrand/atrium.git
synced 2026-03-10 08:01:19 +00:00
Merge pull request #441 from robstoll/cleanup-elementsOf-specs
add test for empty iterable for contains.inOrder.only.elementsOf
This commit is contained in:
@@ -8,7 +8,7 @@ import org.spekframework.spek2.style.specification.describe
|
||||
class IterableContainsInAnyOrderAtLeast1ElementsOfAssertionsSpec : Spek({
|
||||
include(BuilderSpec)
|
||||
|
||||
describe("elementsOf") {
|
||||
describe("contains.inAnyOrder.atLeast(1).elementsOf") {
|
||||
it("passing an empty iterable throws an IllegalArgumentException") {
|
||||
expect {
|
||||
expect(listOf(1, 2)).contains.inAnyOrder.atLeast(1).elementsOf(listOf())
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.spekframework.spek2.style.specification.describe
|
||||
class IterableContainsInAnyOrderOnlyElementsOfAssertionSpec : Spek({
|
||||
include(BuilderSpec)
|
||||
|
||||
describe("elementsOf") {
|
||||
describe("contains.inAnyOrder.only.elementsOf") {
|
||||
it("passing an empty iterable throws an IllegalArgumentException") {
|
||||
expect {
|
||||
expect(listOf(1, 2)).contains.inAnyOrder.only.elementsOf(listOf())
|
||||
|
||||
@@ -1,10 +1,20 @@
|
||||
package ch.tutteli.atrium.api.fluent.en_GB
|
||||
|
||||
import ch.tutteli.atrium.api.verbs.internal.expect
|
||||
import ch.tutteli.atrium.creating.Expect
|
||||
import org.spekframework.spek2.Spek
|
||||
import org.spekframework.spek2.style.specification.describe
|
||||
|
||||
class IterableContainsInOrderOnlyElementsOfAssertionSpec : Spek({
|
||||
include(BuilderSpec)
|
||||
|
||||
describe("contains.inOrder.only.elementsOf") {
|
||||
it("passing an empty iterable throws an IllegalArgumentException") {
|
||||
expect {
|
||||
expect(listOf(1, 2)).contains.inOrder.only.elementsOf(listOf())
|
||||
}.toThrow<IllegalArgumentException>()
|
||||
}
|
||||
}
|
||||
}) {
|
||||
object BuilderSpec : ch.tutteli.atrium.specs.integration.IterableContainsInOrderOnlyValuesAssertionsSpec(
|
||||
getContainsPair(),
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.spekframework.spek2.style.specification.describe
|
||||
class IterableContainsInAnyOrderAtLeast1ElementsOfAssertionsSpec : Spek({
|
||||
include(BuilderSpec)
|
||||
|
||||
describe("elementsOf") {
|
||||
describe("contains o inAny order atLeast 1 elementsOf") {
|
||||
it("passing an empty iterable throws an IllegalArgumentException") {
|
||||
expect {
|
||||
expect(listOf(1, 2)) contains o inAny order atLeast 1 elementsOf listOf()
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.spekframework.spek2.style.specification.describe
|
||||
class IterableContainsInAnyOrderOnlyElementsOfAssertionSpec : Spek({
|
||||
include(BuilderSpec)
|
||||
|
||||
describe("elementsOf") {
|
||||
describe("contains o inAny order but only elementsOf") {
|
||||
it("passing an empty iterable throws an IllegalArgumentException") {
|
||||
expect {
|
||||
expect(listOf(1, 2)) contains o inAny order but only elementsOf listOf()
|
||||
|
||||
@@ -1,10 +1,20 @@
|
||||
package ch.tutteli.atrium.api.infix.en_GB
|
||||
|
||||
import ch.tutteli.atrium.api.verbs.internal.expect
|
||||
import ch.tutteli.atrium.creating.Expect
|
||||
import org.spekframework.spek2.Spek
|
||||
import org.spekframework.spek2.style.specification.describe
|
||||
|
||||
class IterableContainsInOrderOnlyElementsOfAssertionSpec : Spek({
|
||||
include(BuilderSpec)
|
||||
|
||||
describe("contains o inGiven order and only elementsOf") {
|
||||
it("passing an empty iterable throws an IllegalArgumentException") {
|
||||
expect {
|
||||
expect(listOf(1, 2)) contains o inGiven order and only elementsOf listOf()
|
||||
}.toThrow<IllegalArgumentException>()
|
||||
}
|
||||
}
|
||||
}) {
|
||||
object BuilderSpec : ch.tutteli.atrium.specs.integration.IterableContainsInOrderOnlyValuesAssertionsSpec(
|
||||
getContainsPair(),
|
||||
|
||||
Reference in New Issue
Block a user