mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 15:15:34 +03:00
Format GeneratorSdkSourceTest (#324)
This commit is contained in:
parent
c3e0843505
commit
fad80fbd69
1 changed files with 40 additions and 40 deletions
|
@ -14,15 +14,15 @@ class GeneratorSdkSourceTest {
|
||||||
private val clientGenerators = mockk<ClientGenerators>()
|
private val clientGenerators = mockk<ClientGenerators>()
|
||||||
private val generatorSdkSource: GeneratorSdkSource = GeneratorSdkSourceImpl(clientGenerators)
|
private val generatorSdkSource: GeneratorSdkSource = GeneratorSdkSourceImpl(clientGenerators)
|
||||||
|
|
||||||
@Suppress("MaxLineLength")
|
|
||||||
@Test
|
@Test
|
||||||
fun `generatePassword should call SDK and return a Result with the generated password`() = runBlocking {
|
fun `generatePassword should call SDK and return a Result with the generated password`() =
|
||||||
|
runBlocking {
|
||||||
val request = PasswordGeneratorRequest(
|
val request = PasswordGeneratorRequest(
|
||||||
lowercase = true,
|
lowercase = true,
|
||||||
uppercase = true,
|
uppercase = true,
|
||||||
numbers = true,
|
numbers = true,
|
||||||
special = true,
|
special = true,
|
||||||
length = 12.toUByte(),
|
length = 12U,
|
||||||
avoidAmbiguous = false,
|
avoidAmbiguous = false,
|
||||||
minLowercase = 1U,
|
minLowercase = 1U,
|
||||||
minUppercase = 1U,
|
minUppercase = 1U,
|
||||||
|
@ -44,11 +44,11 @@ class GeneratorSdkSourceTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("MaxLineLength")
|
|
||||||
@Test
|
@Test
|
||||||
fun `generatePassphrase should call SDK and return a Result with the generated passphrase`() = runBlocking {
|
fun `generatePassphrase should call SDK and return a Result with the generated passphrase`() =
|
||||||
|
runBlocking {
|
||||||
val request = PassphraseGeneratorRequest(
|
val request = PassphraseGeneratorRequest(
|
||||||
numWords = 4.toUByte(),
|
numWords = 4U,
|
||||||
wordSeparator = "-",
|
wordSeparator = "-",
|
||||||
capitalize = true,
|
capitalize = true,
|
||||||
includeNumber = true,
|
includeNumber = true,
|
||||||
|
|
Loading…
Reference in a new issue