ScopedRuleTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Use parameter types in method descriptor

+review REVIEW-5921

  1. … 27 more files in changeset.
Store rule definition in extracted rule

  1. … 13 more files in changeset.
Expose bindings store to rule extractor

+review REVIEW-5761

  1. … 5 more files in changeset.
Reworked interaction between rule source extractor and the extracted rules, to allow implicit inputs and other state to be attached to rule actions.

+review REVIEW-5756

  1. … 17 more files in changeset.
Reworked the parameters to `ExtractedModelRule.apply()` so that per-application context, such as explicit bindings, can be provided.

+review REVIEW-5756

  1. … 12 more files in changeset.
Introduced a type to represent an inspected rule source.

Previously this was represented as a set of rule methods. Introducing a type will allow meta-data that applies to the rule source as a whole, such as implicit inputs, to be captured.

+review REVIEW-5756

  1. … 13 more files in changeset.
Moved some classes from o.g.model.internal.core to o.g.model.internal.inspect.

Also moved a class that was only used by a single test to live in that test class.

+review REVIEW-5756

  1. … 27 more files in changeset.
Introduced a schema extraction strategy for `RuleSource` and reuse the schema store for model rule extraction.

This means that consistent inspections and constraints for properties and state can be applied to `RuleSource` and `@Managed` types, and that the schema for a `RuleSource` can reference the schemas for model element types (and vice versa potentially, or at least we can understand when this is happening and complain about it).

+review REVIEW-5756

  1. … 9 more files in changeset.
Some initial support for abstract `RuleSource` implementations.

+review REVIEW-5756

  1. … 6 more files in changeset.
Introduced `MethodModelRuleExtractionContext` to allow extraction strategies access to some more stuff during extraction.

In particular, this allows a strategy to perform inspection of rule sources referenced by a method rule.

The context also allows the strategy to provide more details of the result of extraction, such as validation problems.

+review REVIEW-5756

  1. … 12 more files in changeset.
Moved a bunch of singletons off several prod classes to live on `ProjectRegistrySpec`.

+review REVIEW-5756

  1. … 30 more files in changeset.
More improvements to validation of a RuleSource type.

- Fixed NPE when a rule method has no parameters.

- Collect more kinds of validation failures, rather than failing on first of these kinds of failures.

- Validate that the first parameter of a `@Rules` metod is assignable to `RuleSource`

+review REVIEW-5739

  1. … 19 more files in changeset.
Simplify the use of ModelRegistryHelperExtension

+review REVIEW-5738

  1. … 9 more files in changeset.
Move ModelRegistryHelper functionality to Groovy extension module

+review REVIEW-5715

  1. … 19 more files in changeset.
Rename ModelRegistry.create() to register() +review REVIEW-5678

  1. … 67 more files in changeset.
Register node initializers via rules

+review REVIEW-5629

  1. … 51 more files in changeset.
Adds a ConstructableTypesRegistry to create types that are not strictly 'managed' - NodeInitializerExtractionStrategy's can be asked what types they support - Fails the build when NodeInitializerRegistry can not find an appropriate node initializer - Removes managed type check ModelDslBacking's

+review REVIEW-5619

  1. … 40 more files in changeset.
Using `NodeInitializerRegistry` to retrieve node initializers

+review REVIEW-5617

  1. … 58 more files in changeset.
Introduced `NodeInitializerRegistry`

+review REVIEW-5617

  1. … 46 more files in changeset.
Tweaks to model rule binding failure error message format.

+review REVIEW-5556

  1. … 30 more files in changeset.
Reimplements the format of rule binding errors - removes file seperator from build script location

+review REVIEW-5556

  1. … 29 more files in changeset.
Shows more concise names for rule source method rules

+review

  1. … 32 more files in changeset.
Reorganised managed model creation to have the schema provide the creation strategy.

This allows custom schema extraction strategies to have a say in how objects are to be created.

+review REVIEW-5536

  1. … 49 more files in changeset.
Support ModelMap as a managed type.

+review

  1. … 39 more files in changeset.
Improve efficiency of string to enum conversion for property setting.

Don't go looking for potential transforms until the dispatch fails and only go looking if property types match.

  1. … 16 more files in changeset.
Add support for beforeEach/afterEach rule methods to ManagedSet.

+review

  1. … 15 more files in changeset.
Allow top level, managed, elements to be added to the model graph.

Example:

model {

thing(Thing) {

}

}

Works for both styles of model blocks.

+review

  1. … 27 more files in changeset.
Pull the error for trying to create model nodes as scopes other than root “up”.

+review REVIEW-5353

  1. … 26 more files in changeset.
Move some scoped rule related tests from collection builder test to their own test class

+review REVIEW-5353

  1. … 1 more file in changeset.
Move test for applying rule sources directly to model nodes out from collection builder specific tests into specific class.

+review REVIEW-5353

    • -0
    • +70
    ./ScopedRuleTest.groovy
  1. … 2 more files in changeset.