Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for withInstanceOf (0.17 sec)

  1. platforms/core-configuration/kotlin-dsl/src/test/kotlin/org/gradle/kotlin/dsl/resolver/ResolverCoordinatorTest.kt

                    "buildscript" to sequenceOf(""),
                    "plugins" to sequenceOf("")
                )
    
            val action1 = resolverActionFor(environment, null)
            org.gradle.kotlin.dsl.fixtures.withInstanceOf<ResolverAction.RequestNew>(action1) {
                val action2 = resolverActionFor(environment, scriptDependencies())
                assertInstanceOf<ResolverAction.ReturnPrevious>(action2)
            }
        }
    
        @Test
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Aug 02 08:06:49 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  2. platforms/core-configuration/kotlin-dsl/src/testFixtures/kotlin/org/gradle/kotlin/dsl/fixtures/Testing.kt

            @Suppress("unchecked_cast")
            return e as T
        }
        fail("Expecting exception of type `$exception`, got none.")
        throw IllegalStateException()
    }
    
    
    inline fun <reified T> withInstanceOf(o: Any, block: T.() -> Unit) {
        block(assertInstanceOf<T>(o))
    }
    
    
    inline fun <reified T> assertInstanceOf(o: Any): T {
        assertThat(o, instanceOf(T::class.java))
        return o as T
    }
    
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Aug 02 08:06:49 UTC 2023
    - 2.3K bytes
    - Viewed (0)
Back to top