-
Notifications
You must be signed in to change notification settings - Fork 354
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### 📝 Description - Upgrade kotlin to 2.0 - Remove unused file [FieldValueInfosExtensions.kt](https://github.com/ExpediaGroup/graphql-kotlin/compare/master...daniel-humla:graphql-kotlin-kotlin-2:upgrade-to-kotlin-2?expand=1#diff-83598ed0250eac913ae661abe96bcc47c344e342f09f8168341c7728d1c5b2ef) - Added minimal additional test [MetadataCapturingDataFetcherFactoryProviderTest.kt](https://github.com/ExpediaGroup/graphql-kotlin/compare/master...daniel-humla:graphql-kotlin-kotlin-2:upgrade-to-kotlin-2?expand=1#diff-8a648bcb4be11526cc310472dbca7a5a26ff15b7a8e5c15668d5f9e19debb18e) to maintain code coverage ### 🔗 Related Issues #2037
- Loading branch information
1 parent
2318398
commit 275e2ab
Showing
4 changed files
with
35 additions
and
34 deletions.
There are no files selected for viewing
31 changes: 0 additions & 31 deletions
31
...m/expediagroup/graphql/dataloader/instrumentation/extensions/FieldValueInfosExtensions.kt
This file was deleted.
Oops, something went wrong.
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
33 changes: 33 additions & 0 deletions
33
...lvm-metadata-generator/src/test/kotlin/MetadataCapturingDataFetcherFactoryProviderTest.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,33 @@ | ||
import com.expediagroup.graphql.plugin.graalvm.MetadataCapturingDataFetcherFactoryProvider | ||
import com.expediagroup.graphql.plugin.graalvm.enums.EnumQuery | ||
import io.github.classgraph.ClassGraph | ||
import io.github.classgraph.ScanResult | ||
import org.junit.jupiter.api.Assertions | ||
import org.junit.jupiter.api.BeforeEach | ||
import org.junit.jupiter.api.Test | ||
import kotlin.reflect.KFunction | ||
|
||
class MetadataCapturingDataFetcherFactoryProviderTest { | ||
|
||
private lateinit var scanResult: ScanResult | ||
private lateinit var provider: MetadataCapturingDataFetcherFactoryProvider | ||
|
||
@BeforeEach | ||
fun setup() { | ||
scanResult = ClassGraph().enableAllInfo().acceptPackages("com.expediagroup.graphql.plugin.graalvm").scan() | ||
provider = MetadataCapturingDataFetcherFactoryProvider(scanResult, listOf("com.expediagroup.graphql.plugin.graalvm")) | ||
|
||
val kClass = EnumQuery::class | ||
val kFunction = kClass.members.find { it.name == "enumArgQuery" } as KFunction<*> | ||
provider.functionDataFetcherFactory(null, kClass, kFunction) | ||
} | ||
|
||
@Test | ||
fun `reflectMetadata should not be empty`() { | ||
val metadata = provider.reflectMetadata() | ||
|
||
Assertions.assertNotNull(metadata) | ||
Assertions.assertTrue(metadata.isNotEmpty(), "Reflect metadata should not be empty") | ||
Assertions.assertEquals(listOf("com.expediagroup.graphql.plugin.graalvm"), provider.supportedPackages) | ||
} | ||
} |