-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #84 from jetbrains-academy/add-tests
Add tests for the last two tasks
- Loading branch information
Showing
6 changed files
with
192 additions
and
35 deletions.
There are no files selected for viewing
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
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
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
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
31 changes: 31 additions & 0 deletions
31
culinaryServer/culinaryServerCookSmoothie/test/SmoothieFunctions.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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import org.jetbrains.academy.test.system.core.models.TestKotlinType | ||
import org.jetbrains.academy.test.system.core.models.classes.TestClass | ||
import org.jetbrains.academy.test.system.core.models.method.TestMethod | ||
import org.jetbrains.academy.test.system.core.models.variable.TestVariable | ||
|
||
internal val getFruitsForSmoothieMethod = TestMethod( | ||
"getFruitsForSmoothie", | ||
TestKotlinType("List", params = listOf("org.jetbrains.kotlin.course.culinary.ingredient.Fruit")), | ||
) | ||
|
||
internal val cookSmoothieMethod = TestMethod( | ||
"cookSmoothie", | ||
TestKotlinType("Unit"), | ||
arguments = listOf( | ||
TestVariable( | ||
name = "fruit", | ||
javaType = "List", | ||
kotlinType = TestKotlinType("List", params = listOf("org.jetbrains.kotlin.course.culinary.ingredient.Fruit")), | ||
), | ||
), | ||
returnTypeJava = "void", | ||
) | ||
|
||
internal val smoothieKtTestClass = TestClass( | ||
"SmoothieKt", | ||
"org.jetbrains.kotlin.course.culinary.game.recipes", | ||
customMethods = listOf( | ||
getFruitsForSmoothieMethod, | ||
cookSmoothieMethod | ||
), | ||
) |
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