@@ -8,65 +8,65 @@ class WordTest {
88 @Test
99 fun `implements #equals` () {
1010 val aInstance = Word (" a" )
11- expect(aInstance).toBe (aInstance)
12- expect(aInstance).toBe (Word (" a" ))
13- expect(Word (" a" )).notToBe (Word (" A" ))
11+ expect(aInstance).toEqual (aInstance)
12+ expect(aInstance).toEqual (Word (" a" ))
13+ expect(Word (" a" )).notToEqual (Word (" A" ))
1414 }
1515
1616 @Test
1717 fun `implements #hashCode` () {
1818 expect(Word (" a" ))
1919 .feature(Word ::hashCode)
20- .toBe (Word (" a" ).hashCode())
20+ .toEqual (Word (" a" ).hashCode())
2121 }
2222
2323 @Test
2424 fun `exposes parts as list` () {
25- expect(Word (" with" , " parts" )).feature(Word ::partsList).containsExactly (" with" , " parts" )
26- expect(Word (listOf (" with" , " parts" ))).feature(Word ::partsList).containsExactly (" with" , " parts" )
27- expect(Word (sequenceOf(" with" , " parts" ))).feature(Word ::partsList).containsExactly (" with" , " parts" )
25+ expect(Word (" with" , " parts" )).feature(Word ::partsList).toContainExactly (" with" , " parts" )
26+ expect(Word (listOf (" with" , " parts" ))).feature(Word ::partsList).toContainExactly (" with" , " parts" )
27+ expect(Word (sequenceOf(" with" , " parts" ))).feature(Word ::partsList).toContainExactly (" with" , " parts" )
2828 }
2929
3030 @Test
3131 fun `exposes parts as sequence` () {
32- expect(Word (" with" , " parts" )).feature(Word ::parts).asIterable().containsExactly (" with" , " parts" )
33- expect(Word (listOf (" with" , " parts" ))).feature(Word ::parts).asIterable().containsExactly (" with" , " parts" )
34- expect(Word (sequenceOf(" with" , " parts" ))).feature(Word ::parts).asIterable().containsExactly (" with" , " parts" )
32+ expect(Word (" with" , " parts" )).feature(Word ::parts).asIterable().toContainExactly (" with" , " parts" )
33+ expect(Word (listOf (" with" , " parts" ))).feature(Word ::parts).asIterable().toContainExactly (" with" , " parts" )
34+ expect(Word (sequenceOf(" with" , " parts" ))).feature(Word ::parts).asIterable().toContainExactly (" with" , " parts" )
3535 }
3636
3737 @Test
3838 fun `allows to add parts` () {
3939 expect((Word (" with" ) + " more" + " parts" ))
40- .toBe (Word (" with" , " more" , " parts" ))
40+ .toEqual (Word (" with" , " more" , " parts" ))
4141 expect(Word (" with" ).plus(" more" , " parts" ))
42- .toBe (Word (" with" , " more" , " parts" ))
42+ .toEqual (Word (" with" , " more" , " parts" ))
4343 }
4444
4545 @Test
4646 fun `allows to add words` () {
4747 expect(Word (" with" ) + Word (" more" , " parts" ))
48- .toBe (Word (" with" , " more" , " parts" ))
48+ .toEqual (Word (" with" , " more" , " parts" ))
4949 }
5050
5151 @Test
5252 fun `allows to map parts` () {
5353 expect(Word (" a" , " b" , " c" ))
5454 .feature(Word ::mapParts, String ::uppercase)
55- .toBe (Word (" A" , " B" , " C" ))
55+ .toEqual (Word (" A" , " B" , " C" ))
5656 }
5757
5858 @Test
5959 fun `allows to flatMap parts` () {
6060 expect(Word (" a" , " b" ))
61- .feature(Word ::flatMapParts) { it -> sequenceOf(" ${it} 1" , " ${it} 2" ) }
62- .toBe (Word (" a1" , " a2" , " b1" , " b2" ))
61+ .feature(Word ::flatMapParts) { sequenceOf(" ${it} 1" , " ${it} 2" ) }
62+ .toEqual (Word (" a1" , " a2" , " b1" , " b2" ))
6363 }
6464
6565 @Test
6666 fun `allows to parse parts from a notation` () {
6767 expect(" these are words with UpperCamelCase" )
6868 .feature(String ::fromNotation, NormalWords )
6969 .feature(Word ::partsFromNotation, UpperCamelCase )
70- .toBe (Word (" these" , " are" , " words" , " with" , " upper" , " camel" , " case" ))
70+ .toEqual (Word (" these" , " are" , " words" , " with" , " upper" , " camel" , " case" ))
7171 }
7272}
0 commit comments