|
1 | 1 | package de.joshuagleitze.stringnotation |
2 | 2 |
|
3 | | -import ch.tutteli.atrium.api.cc.en_GB.asIterable |
4 | | -import ch.tutteli.atrium.api.cc.en_GB.containsExactly |
5 | | -import ch.tutteli.atrium.api.cc.en_GB.property |
6 | | -import ch.tutteli.atrium.verbs.expect |
| 3 | +import ch.tutteli.atrium.api.fluent.en_GB.asIterable |
| 4 | +import ch.tutteli.atrium.api.fluent.en_GB.containsExactly |
| 5 | +import ch.tutteli.atrium.api.fluent.en_GB.feature |
| 6 | +import ch.tutteli.atrium.api.verbs.expect |
7 | 7 | import org.junit.jupiter.api.Test |
8 | 8 |
|
9 | 9 | class WordTest { |
10 | 10 | @Test |
11 | 11 | fun `exposes parts as list`() { |
12 | | - expect(Word("with", "parts")).property(Word::partsList).containsExactly("with", "parts") |
13 | | - expect(Word(listOf("with", "parts"))).property(Word::partsList).containsExactly("with", "parts") |
14 | | - expect(Word(sequenceOf("with", "parts"))).property(Word::partsList).containsExactly("with", "parts") |
| 12 | + expect(Word("with", "parts")).feature(Word::partsList).containsExactly("with", "parts") |
| 13 | + expect(Word(listOf("with", "parts"))).feature(Word::partsList).containsExactly("with", "parts") |
| 14 | + expect(Word(sequenceOf("with", "parts"))).feature(Word::partsList).containsExactly("with", "parts") |
15 | 15 | } |
16 | 16 |
|
17 | 17 | @Test |
18 | 18 | fun `exposes parts as sequence`() { |
19 | | - expect(Word("with", "parts")).property(Word::parts).asIterable().containsExactly("with", "parts") |
20 | | - expect(Word(listOf("with", "parts"))).property(Word::parts).asIterable().containsExactly("with", "parts") |
21 | | - expect(Word(sequenceOf("with", "parts"))).property(Word::parts).asIterable().containsExactly("with", "parts") |
| 19 | + expect(Word("with", "parts")).feature(Word::parts).asIterable().containsExactly("with", "parts") |
| 20 | + expect(Word(listOf("with", "parts"))).feature(Word::parts).asIterable().containsExactly("with", "parts") |
| 21 | + expect(Word(sequenceOf("with", "parts"))).feature(Word::parts).asIterable().containsExactly("with", "parts") |
22 | 22 | } |
23 | 23 |
|
24 | 24 | @Test |
25 | 25 | fun `allows to add parts`() { |
26 | | - expect((Word("with") + "more" + "parts")).property(Word::partsList).containsExactly("with", "more", "parts") |
| 26 | + expect((Word("with") + "more" + "parts")).feature(Word::partsList).containsExactly("with", "more", "parts") |
27 | 27 | } |
28 | 28 | } |
0 commit comments