Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for registerInstance (0.18 sec)

  1. platforms/core-configuration/model-core/src/test/groovy/org/gradle/model/internal/registry/DefaultModelRegistryTest.groovy

      foo creator
        inputs:
          - <no path> Long [*]
    '''
        }
    
        def "cannot register when by-type input is ambiguous"() {
            given:
            registry.registerInstance("other-1", 11)
            registry.registerInstance("other-2", 12)
    
            when:
            registry.register("foo") { it.descriptor("foo creator").unmanaged(String, Number, Stub(Transformer)) }
            registry.bindAllReferences()
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 56K bytes
    - Viewed (0)
  2. platforms/core-configuration/model-core/src/test/groovy/org/gradle/model/internal/registry/ScopedRuleTest.groovy

            String value
        }
    
        def "by-path bindings of scoped rules are bound to inner scope"() {
            given:
            registry.registerInstance("first", new MutableValue())
                .registerInstance("second", new MutableValue())
                .registerInstance("values", "foo")
                .apply("values", ByPathBoundInputsChildRule)
                .mutate {
                it.path "values" node {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  3. subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/DefaultRealizableTaskCollectionTest.groovy

            given:
            ModelRegistryHelper registry = new ModelRegistryHelper()
            ModelPath path = ModelPath.path("tasks")
            registry.registerInstance("tasks", "foo tasks")
                .mutate {
                it.path "tasks" node {
                    it.addLinkInstance(taskPath, Mock(realizableType))
                }
            }
    
            when:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Dec 22 12:57:17 UTC 2020
    - 3.5K bytes
    - Viewed (0)
  4. platforms/core-configuration/model-core/src/test/groovy/org/gradle/model/internal/inspect/RuleDefinitionRuleExtractorTest.groovy

                subject.value = "input: " + input
            }
        }
    
        def "extracts input parameters"() {
            given:
            registry.registerInstance("input", 12)
            registry.registerInstance("item", new Bean())
            def node = ((DefaultModelRegistry) registry).node("item")
    
            when:
            def ruleSource = extractor.extract RuleSourceWithParameter
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 5.1K bytes
    - Viewed (0)
  5. platforms/software/platform-base/src/testFixtures/groovy/org/gradle/test/fixtures/BaseInstanceFixtureSupport.groovy

                                                            String name, Closure<I> createUnmanagedInstance) {
            def modelRegistry = new ModelRegistryHelper()
            modelRegistry.registerInstance("nodeInitializerRegistry", ProjectRegistrySpec.NODE_INITIALIZER_REGISTRY)
    
            def publicTypeSchema = (StructSchema<T>) SCHEMA_STORE.getSchema(publicType)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Oct 11 12:16:09 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  6. platforms/core-configuration/model-core/src/test/groovy/org/gradle/model/NodeBackedModelMapSpec.groovy

        def "inputs of a rule from an inner source are not realised if the rule is not required"() {
            given:
            def mmType = ModelTypes.modelMap(Bean)
            def events = []
            registry
                .registerInstance("input", "input") { events << "input created" }
                .registerModelMap("beans", Bean) { it.registerFactory(Bean) { new Bean(name: it) } }
                .mutate {
                    it.path "beans" type mmType action { c ->
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 38.3K bytes
    - Viewed (0)
  7. platforms/core-configuration/model-core/src/test/groovy/org/gradle/model/internal/manage/projection/ModelSetModelProjectionTest.groovy

            set[0].value == "before after"
            set[1].value == "before after"
        }
    
        def "cannot configure children when used as an input - #method"() {
            when:
            registry.registerInstance("things", []).mutate {
                it.path("things").action(reference.path, reference.type, { things, set ->
                    set."$method" {
    
                    }
                })
            }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  8. platforms/core-configuration/model-core/src/testFixtures/groovy/org/gradle/model/internal/fixture/ModelRegistryHelperExtension.java

            return modelRegistry.node(ModelPath.path(path));
        }
    
        public static <C> ModelRegistry registerInstance(ModelRegistry modelRegistry, String path, final C c) {
            return modelRegistry.register(unmanaged(registration(ModelPath.path(path)), c));
        }
    
        public static <C> ModelRegistry registerInstance(ModelRegistry modelRegistry, String path, final C c, Action<? super C> action) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 18.7K bytes
    - Viewed (0)
Back to top