Search in sources :

Example 1 with TestDescriptionService

use of org.ihtsdo.drools.rulestestrig.service.TestDescriptionService in project snomed-drools by IHTSDO.

the class RulesTestManual method setup.

@Before
public void setup() {
    ManualResourceConfiguration resourceConfiguration = new ManualResourceConfiguration(true, false, new ResourceConfiguration.Local("src/test/resources/dummy-test-resources"), null);
    TestResourceProvider testResourceProvider = this.ruleExecutor.newTestResourceProvider(new ResourceManager(resourceConfiguration, null));
    conceptService = new TestConceptService(concepts);
    descriptionService = new TestDescriptionService(concepts, testResourceProvider);
    relationshipService = new TestRelationshipService(concepts);
}
Also used : TestDescriptionService(org.ihtsdo.drools.rulestestrig.service.TestDescriptionService) TestConceptService(org.ihtsdo.drools.rulestestrig.service.TestConceptService) TestRelationshipService(org.ihtsdo.drools.rulestestrig.service.TestRelationshipService) ResourceManager(org.ihtsdo.otf.resourcemanager.ResourceManager) ManualResourceConfiguration(org.ihtsdo.otf.resourcemanager.ManualResourceConfiguration) TestResourceProvider(org.ihtsdo.drools.service.TestResourceProvider) ResourceConfiguration(org.ihtsdo.otf.resourcemanager.ResourceConfiguration) ManualResourceConfiguration(org.ihtsdo.otf.resourcemanager.ManualResourceConfiguration) Before(org.junit.Before)

Example 2 with TestDescriptionService

use of org.ihtsdo.drools.rulestestrig.service.TestDescriptionService in project snomed-drools by IHTSDO.

the class RuleExecutorTest method setup.

@Before
public void setup() {
    ruleExecutor = new RuleExecutorFactory().createRuleExecutor("src/test/resources/rules");
    ManualResourceConfiguration resourceConfiguration = new ManualResourceConfiguration(true, false, new ResourceConfiguration.Local("src/test/resources/dummy-test-resources"), null);
    TestResourceProvider testResourceProvider = ruleExecutor.newTestResourceProvider(new ResourceManager(resourceConfiguration, null));
    final Map<String, Concept> concepts = new HashMap<>();
    conceptService = new TestConceptService(concepts);
    descriptionService = new TestDescriptionService(concepts, testResourceProvider);
    relationshipService = new TestRelationshipService(concepts);
}
Also used : Concept(org.ihtsdo.drools.domain.Concept) TestDescriptionService(org.ihtsdo.drools.rulestestrig.service.TestDescriptionService) ResourceManager(org.ihtsdo.otf.resourcemanager.ResourceManager) RuleExecutorFactory(org.ihtsdo.drools.RuleExecutorFactory) ManualResourceConfiguration(org.ihtsdo.otf.resourcemanager.ManualResourceConfiguration) TestResourceProvider(org.ihtsdo.drools.service.TestResourceProvider) ResourceConfiguration(org.ihtsdo.otf.resourcemanager.ResourceConfiguration) ManualResourceConfiguration(org.ihtsdo.otf.resourcemanager.ManualResourceConfiguration) TestConceptService(org.ihtsdo.drools.rulestestrig.service.TestConceptService) TestRelationshipService(org.ihtsdo.drools.rulestestrig.service.TestRelationshipService) Before(org.junit.Before)

Aggregations

TestConceptService (org.ihtsdo.drools.rulestestrig.service.TestConceptService)2 TestDescriptionService (org.ihtsdo.drools.rulestestrig.service.TestDescriptionService)2 TestRelationshipService (org.ihtsdo.drools.rulestestrig.service.TestRelationshipService)2 TestResourceProvider (org.ihtsdo.drools.service.TestResourceProvider)2 ManualResourceConfiguration (org.ihtsdo.otf.resourcemanager.ManualResourceConfiguration)2 ResourceConfiguration (org.ihtsdo.otf.resourcemanager.ResourceConfiguration)2 ResourceManager (org.ihtsdo.otf.resourcemanager.ResourceManager)2 Before (org.junit.Before)2 RuleExecutorFactory (org.ihtsdo.drools.RuleExecutorFactory)1 Concept (org.ihtsdo.drools.domain.Concept)1