Skip to content

Commit d0bb6f2

Browse files
authored
Merge pull request #436 from robstoll/prepare-deprecation-of-cc-infix
Prepare deprecation of cc infix
2 parents cc4b316 + a85c44d commit d0bb6f2

File tree

18 files changed

+61
-46
lines changed

18 files changed

+61
-46
lines changed

apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/anyAssertions.kt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -164,14 +164,5 @@ val <T : Any> AssertionPlant<T>.and: AssertionPlant<T> get() = this
164164
*
165165
* @return This plant to support a fluent API.
166166
*/
167-
@Deprecated(
168-
"Switch from Assert to Expect; will be removed with 1.0.0",
169-
ReplaceWith(
170-
"this.asExpect().and(assertionCreator).asAssert()",
171-
"ch.tutteli.atrium.domain.builders.migration.asExpect",
172-
"ch.tutteli.atrium.domain.builders.migration.asAssert",
173-
"ch.tutteli.atrium.api.fluent.en_GB.and"
174-
)
175-
)
176167
infix fun <T : Any> AssertionPlant<T>.and(assertionCreator: Assert<T>.() -> Unit) =
177168
addAssertionsCreatedBy(assertionCreator)

apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/arrayAssertions.kt

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ import kotlin.jvm.JvmName
1717
@Deprecated(
1818
"Switch from Assert to Expect; will be removed with 1.0.0",
1919
ReplaceWith(
20-
"this.asExpect().asIterable().asAssert()",
20+
"this.asExpect().asList().asAssert()",
2121
"ch.tutteli.atrium.domain.builders.migration.asExpect",
2222
"ch.tutteli.atrium.domain.builders.migration.asAssert",
23-
"ch.tutteli.atrium.api.fluent.en_GB.asIterable"
23+
"ch.tutteli.atrium.api.fluent.en_GB.asList"
2424
)
2525
)
2626
fun <E> Assert<Array<out E>>.asIterable(): Assert<Iterable<E>> =
@@ -38,10 +38,10 @@ fun <E> Assert<Array<out E>>.asIterable(): Assert<Iterable<E>> =
3838
@Deprecated(
3939
"Switch from Assert to Expect; will be removed with 1.0.0",
4040
ReplaceWith(
41-
"this.asExpect().asIterable().asAssert(assertionCreator)",
41+
"this.asExpect().asList().asAssert(assertionCreator)",
4242
"ch.tutteli.atrium.domain.builders.migration.asExpect",
4343
"ch.tutteli.atrium.domain.builders.migration.asAssert",
44-
"ch.tutteli.atrium.api.fluent.en_GB.asIterable"
44+
"ch.tutteli.atrium.api.fluent.en_GB.asList"
4545
)
4646
)
4747
fun <E> Assert<Array<out E>>.asIterable(assertionCreator: Assert<Iterable<E>>.() -> Unit): Assert<Iterable<E>> =
@@ -59,10 +59,10 @@ fun <E> Assert<Array<out E>>.asIterable(assertionCreator: Assert<Iterable<E>>.()
5959
@Deprecated(
6060
"Switch from Assert to Expect; will be removed with 1.0.0",
6161
ReplaceWith(
62-
"this.asExpect().asIterable().asAssert()",
62+
"this.asExpect().asList().asAssert()",
6363
"ch.tutteli.atrium.domain.builders.migration.asExpect",
6464
"ch.tutteli.atrium.domain.builders.migration.asAssert",
65-
"ch.tutteli.atrium.api.fluent.en_GB.asIterable"
65+
"ch.tutteli.atrium.api.fluent.en_GB.asList"
6666
)
6767
)
6868
@JvmName("byteArrAsIterable")
@@ -81,10 +81,10 @@ fun Assert<ByteArray>.asIterable(): Assert<Iterable<Byte>> =
8181
@Deprecated(
8282
"Switch from Assert to Expect; will be removed with 1.0.0",
8383
ReplaceWith(
84-
"this.asExpect().asIterable().asAssert(assertionCreator)",
84+
"this.asExpect().asList().asAssert(assertionCreator)",
8585
"ch.tutteli.atrium.domain.builders.migration.asExpect",
8686
"ch.tutteli.atrium.domain.builders.migration.asAssert",
87-
"ch.tutteli.atrium.api.fluent.en_GB.asIterable"
87+
"ch.tutteli.atrium.api.fluent.en_GB.asList"
8888
)
8989
)
9090
@JvmName("byteArrAsIterable")
@@ -103,10 +103,10 @@ fun Assert<ByteArray>.asIterable(assertionCreator: Assert<Iterable<Byte>>.() ->
103103
@Deprecated(
104104
"Switch from Assert to Expect; will be removed with 1.0.0",
105105
ReplaceWith(
106-
"this.asExpect().asIterable().asAssert()",
106+
"this.asExpect().asList().asAssert()",
107107
"ch.tutteli.atrium.domain.builders.migration.asExpect",
108108
"ch.tutteli.atrium.domain.builders.migration.asAssert",
109-
"ch.tutteli.atrium.api.fluent.en_GB.asIterable"
109+
"ch.tutteli.atrium.api.fluent.en_GB.asList"
110110
)
111111
)
112112
@JvmName("charArrAsIterable")
@@ -125,10 +125,10 @@ fun Assert<CharArray>.asIterable(): Assert<Iterable<Char>> =
125125
@Deprecated(
126126
"Switch from Assert to Expect; will be removed with 1.0.0",
127127
ReplaceWith(
128-
"this.asExpect().asIterable().asAssert(assertionCreator)",
128+
"this.asExpect().asList().asAssert(assertionCreator)",
129129
"ch.tutteli.atrium.domain.builders.migration.asExpect",
130130
"ch.tutteli.atrium.domain.builders.migration.asAssert",
131-
"ch.tutteli.atrium.api.fluent.en_GB.asIterable"
131+
"ch.tutteli.atrium.api.fluent.en_GB.asList"
132132
)
133133
)
134134
@JvmName("charArrAsIterable")
@@ -147,10 +147,10 @@ fun Assert<CharArray>.asIterable(assertionCreator: Assert<Iterable<Char>>.() ->
147147
@Deprecated(
148148
"Switch from Assert to Expect; will be removed with 1.0.0",
149149
ReplaceWith(
150-
"this.asExpect().asIterable().asAssert()",
150+
"this.asExpect().asList().asAssert()",
151151
"ch.tutteli.atrium.domain.builders.migration.asExpect",
152152
"ch.tutteli.atrium.domain.builders.migration.asAssert",
153-
"ch.tutteli.atrium.api.fluent.en_GB.asIterable"
153+
"ch.tutteli.atrium.api.fluent.en_GB.asList"
154154
)
155155
)
156156
@JvmName("shortArrAsIterable")
@@ -169,10 +169,10 @@ fun Assert<ShortArray>.asIterable(): Assert<Iterable<Short>> =
169169
@Deprecated(
170170
"Switch from Assert to Expect; will be removed with 1.0.0",
171171
ReplaceWith(
172-
"this.asExpect().asIterable().asAssert(assertionCreator)",
172+
"this.asExpect().asList().asAssert(assertionCreator)",
173173
"ch.tutteli.atrium.domain.builders.migration.asExpect",
174174
"ch.tutteli.atrium.domain.builders.migration.asAssert",
175-
"ch.tutteli.atrium.api.fluent.en_GB.asIterable"
175+
"ch.tutteli.atrium.api.fluent.en_GB.asList"
176176
)
177177
)
178178
@JvmName("shortArrAsIterable")
@@ -191,10 +191,10 @@ fun Assert<ShortArray>.asIterable(assertionCreator: Assert<Iterable<Short>>.() -
191191
@Deprecated(
192192
"Switch from Assert to Expect; will be removed with 1.0.0",
193193
ReplaceWith(
194-
"this.asExpect().asIterable().asAssert()",
194+
"this.asExpect().asList().asAssert()",
195195
"ch.tutteli.atrium.domain.builders.migration.asExpect",
196196
"ch.tutteli.atrium.domain.builders.migration.asAssert",
197-
"ch.tutteli.atrium.api.fluent.en_GB.asIterable"
197+
"ch.tutteli.atrium.api.fluent.en_GB.asList"
198198
)
199199
)
200200
@JvmName("intArrAsIterable")
@@ -212,10 +212,10 @@ fun Assert<IntArray>.asIterable(): Assert<Iterable<Int>> = ExpectImpl.changeSubj
212212
@Deprecated(
213213
"Switch from Assert to Expect; will be removed with 1.0.0",
214214
ReplaceWith(
215-
"this.asExpect().asIterable().asAssert(assertionCreator)",
215+
"this.asExpect().asList().asAssert(assertionCreator)",
216216
"ch.tutteli.atrium.domain.builders.migration.asExpect",
217217
"ch.tutteli.atrium.domain.builders.migration.asAssert",
218-
"ch.tutteli.atrium.api.fluent.en_GB.asIterable"
218+
"ch.tutteli.atrium.api.fluent.en_GB.asList"
219219
)
220220
)
221221
@JvmName("intArrAsIterable")
@@ -234,10 +234,10 @@ fun Assert<IntArray>.asIterable(assertionCreator: Assert<Iterable<Int>>.() -> Un
234234
@Deprecated(
235235
"Switch from Assert to Expect; will be removed with 1.0.0",
236236
ReplaceWith(
237-
"this.asExpect().asIterable().asAssert()",
237+
"this.asExpect().asList().asAssert()",
238238
"ch.tutteli.atrium.domain.builders.migration.asExpect",
239239
"ch.tutteli.atrium.domain.builders.migration.asAssert",
240-
"ch.tutteli.atrium.api.fluent.en_GB.asIterable"
240+
"ch.tutteli.atrium.api.fluent.en_GB.asList"
241241
)
242242
)
243243
@JvmName("longArrAsIterable")
@@ -256,10 +256,10 @@ fun Assert<LongArray>.asIterable(): Assert<Iterable<Long>> =
256256
@Deprecated(
257257
"Switch from Assert to Expect; will be removed with 1.0.0",
258258
ReplaceWith(
259-
"this.asExpect().asIterable().asAssert(assertionCreator)",
259+
"this.asExpect().asList().asAssert(assertionCreator)",
260260
"ch.tutteli.atrium.domain.builders.migration.asExpect",
261261
"ch.tutteli.atrium.domain.builders.migration.asAssert",
262-
"ch.tutteli.atrium.api.fluent.en_GB.asIterable"
262+
"ch.tutteli.atrium.api.fluent.en_GB.asList"
263263
)
264264
)
265265
@JvmName("longArrAsIterable")
@@ -278,10 +278,10 @@ fun Assert<LongArray>.asIterable(assertionCreator: Assert<Iterable<Long>>.() ->
278278
@Deprecated(
279279
"Switch from Assert to Expect; will be removed with 1.0.0",
280280
ReplaceWith(
281-
"this.asExpect().asIterable().asAssert()",
281+
"this.asExpect().asList().asAssert()",
282282
"ch.tutteli.atrium.domain.builders.migration.asExpect",
283283
"ch.tutteli.atrium.domain.builders.migration.asAssert",
284-
"ch.tutteli.atrium.api.fluent.en_GB.asIterable"
284+
"ch.tutteli.atrium.api.fluent.en_GB.asList"
285285
)
286286
)
287287
@JvmName("floatArrAsIterable")
@@ -300,10 +300,10 @@ fun Assert<FloatArray>.asIterable(): Assert<Iterable<Float>> =
300300
@Deprecated(
301301
"Switch from Assert to Expect; will be removed with 1.0.0",
302302
ReplaceWith(
303-
"this.asExpect().asIterable().asAssert(assertionCreator)",
303+
"this.asExpect().asList().asAssert(assertionCreator)",
304304
"ch.tutteli.atrium.domain.builders.migration.asExpect",
305305
"ch.tutteli.atrium.domain.builders.migration.asAssert",
306-
"ch.tutteli.atrium.api.fluent.en_GB.asIterable"
306+
"ch.tutteli.atrium.api.fluent.en_GB.asList"
307307
)
308308
)
309309
@JvmName("floatArrAsIterable")
@@ -322,10 +322,10 @@ fun Assert<FloatArray>.asIterable(assertionCreator: Assert<Iterable<Float>>.() -
322322
@Deprecated(
323323
"Switch from Assert to Expect; will be removed with 1.0.0",
324324
ReplaceWith(
325-
"this.asExpect().asIterable().asAssert()",
325+
"this.asExpect().asList().asAssert()",
326326
"ch.tutteli.atrium.domain.builders.migration.asExpect",
327327
"ch.tutteli.atrium.domain.builders.migration.asAssert",
328-
"ch.tutteli.atrium.api.fluent.en_GB.asIterable"
328+
"ch.tutteli.atrium.api.fluent.en_GB.asList"
329329
)
330330
)
331331
@JvmName("doubleArrAsIterable")
@@ -344,10 +344,10 @@ fun Assert<DoubleArray>.asIterable(): Assert<Iterable<Double>> =
344344
@Deprecated(
345345
"Switch from Assert to Expect; will be removed with 1.0.0",
346346
ReplaceWith(
347-
"this.asExpect().asIterable().asAssert(assertionCreator)",
347+
"this.asExpect().asList().asAssert(assertionCreator)",
348348
"ch.tutteli.atrium.domain.builders.migration.asExpect",
349349
"ch.tutteli.atrium.domain.builders.migration.asAssert",
350-
"ch.tutteli.atrium.api.fluent.en_GB.asIterable"
350+
"ch.tutteli.atrium.api.fluent.en_GB.asList"
351351
)
352352
)
353353
@JvmName("doubleArrAsIterable")
@@ -366,10 +366,10 @@ fun Assert<DoubleArray>.asIterable(assertionCreator: Assert<Iterable<Double>>.()
366366
@Deprecated(
367367
"Switch from Assert to Expect; will be removed with 1.0.0",
368368
ReplaceWith(
369-
"this.asExpect().asIterable().asAssert()",
369+
"this.asExpect().asList().asAssert()",
370370
"ch.tutteli.atrium.domain.builders.migration.asExpect",
371371
"ch.tutteli.atrium.domain.builders.migration.asAssert",
372-
"ch.tutteli.atrium.api.fluent.en_GB.asIterable"
372+
"ch.tutteli.atrium.api.fluent.en_GB.asList"
373373
)
374374
)
375375
@JvmName("boolArrAsIterable")
@@ -388,10 +388,10 @@ fun Assert<BooleanArray>.asIterable(): Assert<Iterable<Boolean>> =
388388
@Deprecated(
389389
"Switch from Assert to Expect; will be removed with 1.0.0",
390390
ReplaceWith(
391-
"this.asExpect().asIterable().asAssert(assertionCreator)",
391+
"this.asExpect().asList().asAssert(assertionCreator)",
392392
"ch.tutteli.atrium.domain.builders.migration.asExpect",
393393
"ch.tutteli.atrium.domain.builders.migration.asAssert",
394-
"ch.tutteli.atrium.api.fluent.en_GB.asIterable"
394+
"ch.tutteli.atrium.api.fluent.en_GB.asList"
395395
)
396396
)
397397
@JvmName("boolArrAsIterable")

apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-android/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ dependencies {
55
api prefixedProject('domain-builders-android')
66

77
testImplementation prefixedProject('verbs-internal-android')
8+
testImplementation prefixedProject('api-infix-en_GB-android')
89
}
910

1011
srcAndResourcesFromJvmProject(project)

apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ dependencies {
1313
api prefixedProject('domain-builders-jvm')
1414

1515
testImplementation prefixedProject('verbs-internal-jvm')
16+
testImplementation prefixedProject('api-infix-en_GB-jvm')
1617
}
1718

1819
//TODO should not be necessary https://youtrack.jetbrains.com/issue/KT-28124

bundles/atrium-cc-infix-en_UK-robstoll/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description = 'Represents a deprecated convenience module which merely bundles d
33

44
dependencies {
55
api prefixedProject('verbs-jvm')
6-
api prefixedProject('api-cc-infix-en_GB-jvm')
6+
api prefixedProject('api-infix-en_GB-jvm')
77
api prefixedProject('translations-en_GB-jvm')
88
api prefixedProject('domain-builders-jvm')
99
api prefixedProject('domain-api-jvm')
@@ -13,6 +13,7 @@ dependencies {
1313
runtimeOnly prefixedProject('core-robstoll-jvm')
1414

1515
//TODO remove with 1.0.0
16+
api prefixedProject('api-cc-infix-en_GB-jvm')
1617
api prefixedProject('api-cc-infix-en_UK')
1718
implementation prefixedProject('assertions')
1819
api prefixedProject('core-api-deprecated')

bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-android/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,7 @@ dependencies {
1010

1111
runtimeOnly prefixedProject('domain-robstoll-android')
1212
runtimeOnly prefixedProject('core-robstoll-android')
13+
14+
// here to ease migration; so that ReplaceWith of @Deprecated works
15+
api prefixedProject('api-infix-en_GB-android')
1316
}

bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-common/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,7 @@ dependencies {
1010

1111
runtimeOnly prefixedProject('domain-robstoll-common')
1212
runtimeOnly prefixedProject('core-robstoll-common')
13+
14+
// here to ease migration; so that ReplaceWith of @Deprecated works
15+
api prefixedProject('api-infix-en_GB-common')
1316
}

bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-js/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@ dependencies {
1111
//TODO should be runtimeOnly but due to https://youtrack.jetbrains.com/issue/KT-27797 it cannot be
1212
implementation prefixedProject('domain-robstoll-js')
1313
implementation prefixedProject('core-robstoll-js')
14+
15+
// here to ease migration; so that ReplaceWith of @Deprecated works
16+
api prefixedProject('api-infix-en_GB-js')
1417
}

bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-jvm/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,7 @@ dependencies {
1010

1111
runtimeOnly prefixedProject('domain-robstoll-jvm')
1212
runtimeOnly prefixedProject('core-robstoll-jvm')
13+
14+
// here to ease migration; so that ReplaceWith of @Deprecated works
15+
api prefixedProject('api-infix-en_GB-jvm')
1316
}

core/api/atrium-core-api-android/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ dependencies {
44
api kbox(), excludeKotlin
55
api kotlinReflect()
66

7+
testImplementation prefixedProject('api-infix-en_GB-android')
78
testImplementation prefixedProject('api-cc-infix-en_GB-android')
89
testImplementation prefixedProject('specs-android')
910
}

core/api/atrium-core-api-common/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ description = 'API of the core of Atrium as common module'
33
dependencies {
44
api "ch.tutteli.kbox:kbox-common:$kbox_version", excludeKotlin
55

6+
testImplementation prefixedProject('api-infix-en_GB-common')
67
testImplementation prefixedProject('api-cc-infix-en_GB-common')
78
testImplementation prefixedProject('specs-common')
89
}

core/api/atrium-core-api-common/src/test/kotlin/ch/tutteli/atrium/core/polyfills/AtriumPropertyTest.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@file:Suppress("DEPRECATION" /* remove once we have migrated to new infix API */)
12
package ch.tutteli.atrium.core.polyfills
23

34
import ch.tutteli.atrium.api.cc.infix.en_GB.toBe

core/api/atrium-core-api-common/src/test/kotlin/ch/tutteli/atrium/core/polyfills/LoadServicesTest.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@file:Suppress("DEPRECATION" /* remove once we have migrated to new infix API */)
12
package ch.tutteli.atrium.core.polyfills
23

34
import ch.tutteli.atrium.api.cc.infix.en_GB.*

core/api/atrium-core-api-common/src/test/kotlin/ch/tutteli/atrium/core/polyfills/LoadSingleServiceTest.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@file:Suppress("DEPRECATION" /* remove once we have migrated to new infix API */)
12
package ch.tutteli.atrium.core.polyfills
23

34
import ch.tutteli.atrium.api.cc.infix.en_GB.Values

core/api/atrium-core-api-common/src/test/kotlin/ch/tutteli/atrium/core/polyfills/UseSingleServiceTest.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@file:Suppress("DEPRECATION" /* remove once we have migrated to new infix API */)
12
package ch.tutteli.atrium.core.polyfills
23

34
import ch.tutteli.atrium.api.cc.infix.en_GB.Values

core/api/atrium-core-api-common/src/test/kotlin/ch/tutteli/atrium/reporting/AtriumErrorSpec.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@file:Suppress("DEPRECATION" /* remove once we have migrated to new infix API */)
12
package ch.tutteli.atrium.reporting
23

34
import ch.tutteli.atrium.api.cc.infix.en_GB.property

core/api/atrium-core-api-js/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ description = 'API of the core of Atrium for the JS platform.'
33
dependencies {
44
api "ch.tutteli.kbox:kbox-js:$kbox_version", excludeKotlin
55

6+
testImplementation prefixedProject('api-infix-en_GB-js')
67
testImplementation prefixedProject('api-cc-infix-en_GB-js')
78
testImplementation prefixedProject('specs-js')
89
}

core/api/atrium-core-api-jvm/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ dependencies {
44
api kbox(), excludeKotlin
55
api kotlinReflect()
66

7+
testImplementation prefixedProject('api-infix-en_GB-jvm')
78
testImplementation prefixedProject('api-cc-infix-en_GB-jvm')
89
testImplementation prefixedProject('specs-jvm')
910
}

0 commit comments

Comments
 (0)