-
-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
9 additions
and
2 deletions.
There are no files selected for viewing
11 changes: 9 additions & 2 deletions
11
exercises/practice/armstrong-numbers/src/test/kotlin/ArmstrongNumberTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,42 @@ | ||
import kotlin.test.Test | ||
import kotlin.test.assertEquals | ||
import kotlin.test.assertFailsWith | ||
import kotlin.test.assertTrue | ||
import kotlin.test.assertFalse | ||
import kotlin.test.Ignore | ||
|
||
class ArmstrongNumberTest { | ||
|
||
@Test | ||
fun `zero is an armstrong number`() = assertTrue(ArmstrongNumber.check(0)) | ||
|
||
@Ignore | ||
@Test | ||
fun `single digit numbers are armstrong numbers`() = assertTrue(ArmstrongNumber.check(5)) | ||
|
||
@Ignore | ||
@Test | ||
fun `there are no 2 digit armstrong numbers`() = assertFalse(ArmstrongNumber.check(10)) | ||
|
||
@Ignore | ||
@Test | ||
fun `three digit number that is an armstrong number`() = assertTrue(ArmstrongNumber.check(153)) | ||
|
||
@Ignore | ||
@Test | ||
fun `three digit number that is not an armstrong number`() = assertFalse(ArmstrongNumber.check(100)) | ||
|
||
@Ignore | ||
@Test | ||
fun `four digit number that is an armstrong number`() = assertTrue(ArmstrongNumber.check(9474)) | ||
|
||
@Ignore | ||
@Test | ||
fun `four digit number that is not an armstrong number`() = assertFalse(ArmstrongNumber.check(9475)) | ||
|
||
@Ignore | ||
@Test | ||
fun `seven digit number that is an armstrong number`() = assertTrue(ArmstrongNumber.check(9926315)) | ||
|
||
@Ignore | ||
@Test | ||
fun `seven digit number that is not an armstrong number`() = assertFalse(ArmstrongNumber.check(9926314)) | ||
} |