Search in sources :

Example 1 with FilterFamilies

use of org.whole.lang.tests.model.FilterFamilies in project whole by wholeplatform.

the class TestsLearningInterpreterVisitor method getFilterFamily.

protected FilterFamily getFilterFamily(TestSuite suite) {
    FilterFamilies filterFamilies = suite.getFilterFamilies();
    FilterFamily filterFamily = null;
    for (int i = 0; i < filterFamilies.wSize(); i++) {
        FilterFamily child = (FilterFamily) filterFamilies.wGet(i);
        if (EntityUtils.isNotResolver(child) && GENERATED_FAMILY_NAME.equals(child.getName().getValue())) {
            filterFamily = child;
            break;
        }
    }
    TestsEntityFactory tef = TestsEntityFactory.instance;
    if (filterFamily == null) {
        filterFamily = tef.createFilterFamily(CommonsEntityAdapterFactory.createResolver(TestsEntityDescriptorEnum.PackageName), tef.createDescription("Auto-generated filter family"), tef.createName(GENERATED_FAMILY_NAME), tef.createFilterRules(0));
    }
    return filterFamily;
}
Also used : FilterFamily(org.whole.lang.tests.model.FilterFamily) TestsEntityFactory(org.whole.lang.tests.factories.TestsEntityFactory) FilterFamilies(org.whole.lang.tests.model.FilterFamilies)

Aggregations

TestsEntityFactory (org.whole.lang.tests.factories.TestsEntityFactory)1 FilterFamilies (org.whole.lang.tests.model.FilterFamilies)1 FilterFamily (org.whole.lang.tests.model.FilterFamily)1