-
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.
Fix the course structure and add more tests
- Loading branch information
Showing
12 changed files
with
362 additions
and
11 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
30 changes: 30 additions & 0 deletions
30
culinaryServer/culinaryServerCookSalad/test/SaladFunctions.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,30 @@ | ||
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 getFreshVegetablesMethod = TestMethod( | ||
"getFreshVegetables", | ||
TestKotlinType("List", params = listOf("org.jetbrains.kotlin.course.culinary.ingredient.Vegetable")), | ||
) | ||
|
||
internal val cutMethod = TestMethod( | ||
"cut", | ||
TestKotlinType("List", params = listOf("org.jetbrains.kotlin.course.culinary.ingredient.CutVegetable")), | ||
arguments = listOf( | ||
TestVariable( | ||
name = "vegetables", | ||
javaType = "List", | ||
kotlinType = TestKotlinType("List", params = listOf("org.jetbrains.kotlin.course.culinary.ingredient.Vegetable")), | ||
), | ||
) | ||
) | ||
|
||
internal val saladKtTestClass = TestClass( | ||
"SaladKt", | ||
"org.jetbrains.kotlin.course.culinary.game.recipes", | ||
customMethods = listOf( | ||
getFreshVegetablesMethod, | ||
cutMethod | ||
), | ||
) |
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
30 changes: 30 additions & 0 deletions
30
culinaryServer/culinaryServerCookSmoothie/test/SaladFunctions.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,30 @@ | ||
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 getFreshVegetablesMethod = TestMethod( | ||
"getFreshVegetables", | ||
TestKotlinType("List", params = listOf("org.jetbrains.kotlin.course.culinary.ingredient.Vegetable")), | ||
) | ||
|
||
internal val cutMethod = TestMethod( | ||
"cut", | ||
TestKotlinType("List", params = listOf("org.jetbrains.kotlin.course.culinary.ingredient.CutVegetable")), | ||
arguments = listOf( | ||
TestVariable( | ||
name = "vegetables", | ||
javaType = "List", | ||
kotlinType = TestKotlinType("List", params = listOf("org.jetbrains.kotlin.course.culinary.ingredient.Vegetable")), | ||
), | ||
) | ||
) | ||
|
||
internal val saladKtTestClass = TestClass( | ||
"SaladKt", | ||
"org.jetbrains.kotlin.course.culinary.game.recipes", | ||
customMethods = listOf( | ||
getFreshVegetablesMethod, | ||
cutMethod | ||
), | ||
) |
Oops, something went wrong.