@@ -19,12 +19,7 @@ package com.google.firebase.dataconnect.testutil
19
19
import androidx.test.ext.junit.runners.AndroidJUnit4
20
20
import com.google.firebase.dataconnect.ConnectorConfig
21
21
import com.google.firebase.util.nextAlphanumericString
22
- import io.kotest.property.Arb
23
22
import io.kotest.property.RandomSource
24
- import io.kotest.property.arbitrary.Codepoint
25
- import io.kotest.property.arbitrary.alphanumeric
26
- import io.kotest.property.arbitrary.arbitrary
27
- import io.kotest.property.arbitrary.string
28
23
import kotlin.random.Random
29
24
import org.junit.Rule
30
25
import org.junit.rules.TestName
@@ -45,32 +40,6 @@ abstract class DataConnectIntegrationTestBase {
45
40
46
41
val rs: RandomSource by randomSeedTestRule.rs
47
42
48
- /* *
49
- * Generates and returns a string containing random alphanumeric characters, including the name of
50
- * the currently-running test as returned from [testName].
51
- *
52
- * @param string The [Arb] to use to generate the random string; if not specified, then an [Arb]
53
- * that generates strings of 20 alphanumeric characters is used.
54
- * @param prefix A prefix to include in the returned string; if null (the default) then no prefix
55
- * will be included.
56
- * @return a string containing random characters and incorporating the other information
57
- * identified above.
58
- */
59
- fun Arb.Companion.alphanumericString (
60
- string : Arb <String > = Arb .string(20, Codepoint .alphanumeric()),
61
- prefix : String? = null,
62
- ): Arb <String > = arbitrary {
63
- buildString {
64
- if (prefix != null ) {
65
- append(prefix)
66
- append(" _" )
67
- }
68
- append(testName)
69
- append(" _" )
70
- append(string.bind())
71
- }
72
- }
73
-
74
43
companion object {
75
44
val testConnectorConfig: ConnectorConfig
76
45
get() =
@@ -98,15 +67,6 @@ val DataConnectIntegrationTestBase.testName
98
67
* @return a string containing random characters and incorporating the other information identified
99
68
* above.
100
69
*/
101
- @Deprecated(
102
- " use Arb.alphanumericString() from DataConnectIntegrationTestBase instead" ,
103
- replaceWith =
104
- ReplaceWith (
105
- " Arb.alphanumericString()" ,
106
- " io.kotest.property.Arb" ,
107
- " com.google.firebase.dataconnect.testutil.DataConnectIntegrationTestBase.alphanumericString" ,
108
- )
109
- )
110
70
fun DataConnectIntegrationTestBase.randomAlphanumericString (
111
71
prefix : String? = null,
112
72
numRandomChars : Int? = null
0 commit comments