Search in sources :

Example 41 with ModelBuilderOperation

use of org.whole.lang.builders.ModelBuilderOperation in project whole by wholeplatform.

the class FactoriesTest method testStrictMatch.

@Test
public void testStrictMatch() {
    IEntity model = new JavaScriptModel().create();
    ModelBuilderOperation op = new ModelBuilderOperation(RegistryConfigurations.STRICT);
    new JavaScriptModel().apply(op);
    IEntity strictModel = op.wGetResult();
    Assert.assertTrue(Matcher.match(model, strictModel));
    op = new ModelBuilderOperation(RegistryConfigurations.RESOLVER);
    new JavaScriptModel().apply(op);
    IEntity resolverModel = op.wGetResult();
    Assert.assertTrue(Matcher.match(model, resolverModel));
    Assert.assertTrue(Matcher.match(strictModel, resolverModel));
}
Also used : ModelBuilderOperation(org.whole.lang.builders.ModelBuilderOperation) IEntity(org.whole.lang.model.IEntity) JavaScriptModel(org.whole.lang.models.codebase.JavaScriptModel) Test(org.junit.Test)

Aggregations

ModelBuilderOperation (org.whole.lang.builders.ModelBuilderOperation)41 IEntity (org.whole.lang.model.IEntity)21 Test (org.junit.Test)18 ICommonsBuilder (org.whole.lang.commons.builders.ICommonsBuilder)8 File (java.io.File)6 ModelTemplate (org.whole.lang.templates.ModelTemplate)6 XmlNormalizerBuilderOperation (org.whole.lang.xml.codebase.XmlNormalizerBuilderOperation)6 ResourceTemplate (org.whole.lang.artifacts.templates.ResourceTemplate)5 IBindingManager (org.whole.lang.bindings.IBindingManager)5 IXmlBuilder (org.whole.lang.xml.builders.IXmlBuilder)5 IArtifactsBuilder (org.whole.lang.artifacts.builders.IArtifactsBuilder)4 StreamPersistenceProvider (org.whole.lang.codebase.StreamPersistenceProvider)4 Document (org.whole.lang.xml.model.Document)4 XmlStoreProducerBuilderOperation (org.whole.lang.xml.util.XmlStoreProducerBuilderOperation)4 XmlStoreConsumerVisitor (org.whole.lang.xml.util.XmlStoreConsumerVisitor)3 Category (org.junit.experimental.categories.Category)2 WorkspaceTemplate (org.whole.lang.artifacts.templates.WorkspaceTemplate)2 IBuilderOperation (org.whole.lang.builders.IBuilderOperation)2 JavaStoreProducerBuilder (org.whole.lang.java.util.JavaStoreProducerBuilder)2 JavaStoreProducerBuilderOperation (org.whole.lang.java.util.JavaStoreProducerBuilderOperation)2