|
1 | 1 | package io.github.hosseinkarami_dev.near.rpc.generator |
2 | 2 |
|
3 | | -import org.jetbrains.kotlin.cli.jvm.K2JVMCompiler |
4 | 3 | import org.junit.jupiter.api.Test |
5 | 4 | import java.io.File |
6 | | -import kotlin.test.assertEquals |
7 | 5 | import kotlin.test.assertTrue |
8 | 6 |
|
9 | 7 | class ModelsGenerationTest { |
10 | | - |
11 | | - @Test |
12 | | - fun `models directory should not be empty`() { |
13 | | - val modelsDir = File(MODELS_DIR) |
14 | | - assertTrue(modelsDir.exists(), "Models directory should exist") |
15 | | - assertTrue(modelsDir.listFiles()?.isNotEmpty() == true, "Models directory should contain generated files") |
16 | | - } |
17 | | - |
18 | | - @Test |
19 | | - fun `at least one model file should be generated`() { |
20 | | - val modelsDir = File(MODELS_DIR) |
21 | | - val kotlinFiles = modelsDir.listFiles { file -> file.extension == "kt" } ?: emptyArray() |
22 | | - assertTrue(kotlinFiles.isNotEmpty(), "Models directory should contain at least one generated .kt file") |
23 | | - } |
24 | | - |
25 | | - @Test |
26 | | - fun `all generated model files should not be empty`() { |
27 | | - val modelsDir = File(MODELS_DIR) |
28 | | - val kotlinFiles = modelsDir.walkTopDown().filter { it.isFile && it.extension == "kt" } |
29 | | - kotlinFiles.forEach { file -> |
30 | | - assertTrue(file.readText().isNotBlank(), "${file.name} should not be empty") |
31 | | - } |
32 | | - } |
| 8 | +// |
| 9 | +// @Test |
| 10 | +// fun `models directory should not be empty`() { |
| 11 | +// val modelsDir = File(MODELS_DIR) |
| 12 | +// assertTrue(modelsDir.exists(), "Models directory should exist") |
| 13 | +// assertTrue(modelsDir.listFiles()?.isNotEmpty() == true, "Models directory should contain generated files") |
| 14 | +// } |
| 15 | +// |
| 16 | +// @Test |
| 17 | +// fun `at least one model file should be generated`() { |
| 18 | +// val modelsDir = File(MODELS_DIR) |
| 19 | +// val kotlinFiles = modelsDir.listFiles { file -> file.extension == "kt" } ?: emptyArray() |
| 20 | +// assertTrue(kotlinFiles.isNotEmpty(), "Models directory should contain at least one generated .kt file") |
| 21 | +// } |
| 22 | +// |
| 23 | +// @Test |
| 24 | +// fun `all generated model files should not be empty`() { |
| 25 | +// val modelsDir = File(MODELS_DIR) |
| 26 | +// val kotlinFiles = modelsDir.walkTopDown().filter { it.isFile && it.extension == "kt" } |
| 27 | +// kotlinFiles.forEach { file -> |
| 28 | +// assertTrue(file.readText().isNotBlank(), "${file.name} should not be empty") |
| 29 | +// } |
| 30 | +// } |
33 | 31 |
|
34 | 32 | // @Test |
35 | 33 | // fun `generated model files should compile without errors`() { |
|
0 commit comments