Search in sources :

Example 6 with Sequence

use of org.whole.lang.queries.model.Sequence in project whole by wholeplatform.

the class ResolversTest method testCompositeEntityResolverTightening.

@Category(KnownFailingTests.class)
@Test
public void testCompositeEntityResolverTightening() {
    org.whole.lang.queries.model.Expression expression = createResolver(QueriesEntityDescriptorEnum.Expression);
    Sequence sequence = qf.createSequence(expression);
    expression.wAdd(qf.createChildStep());
    Assert.assertTrue(EntityUtils.isResolver(expression));
    expression.wAdd(qf.createPath());
    Assert.assertTrue(Matcher.matchImpl(QueriesEntityDescriptorEnum.Sequence, sequence.wGet(0)));
}
Also used : Sequence(org.whole.lang.queries.model.Sequence) Category(org.junit.experimental.categories.Category) Test(org.junit.Test)

Example 7 with Sequence

use of org.whole.lang.queries.model.Sequence in project whole by wholeplatform.

the class ResolversTest method testCompositeEntityResolverTighteningSetByIndex.

@Category(KnownFailingTests.class)
@Test
public void testCompositeEntityResolverTighteningSetByIndex() {
    org.whole.lang.queries.model.Expression expression = createResolver(QueriesEntityDescriptorEnum.Expression);
    Sequence sequence = qf.createSequence(expression);
    expression.wSet(0, qf.createChildStep());
    Assert.assertTrue(EntityUtils.isResolver(expression));
    expression.wSet(1, qf.createPath());
    Assert.assertTrue(Matcher.matchImpl(QueriesEntityDescriptorEnum.Sequence, sequence.wGet(0)));
}
Also used : Sequence(org.whole.lang.queries.model.Sequence) Category(org.junit.experimental.categories.Category) Test(org.junit.Test)

Example 8 with Sequence

use of org.whole.lang.queries.model.Sequence in project whole by wholeplatform.

the class ResolversTest method testCompositeEntityResolverTighteningSetByIndexSparse.

@Category(KnownFailingTests.class)
@Test
public void testCompositeEntityResolverTighteningSetByIndexSparse() {
    org.whole.lang.queries.model.Expression expression = createResolver(QueriesEntityDescriptorEnum.Expression);
    Sequence sequence = qf.createSequence(expression);
    expression.wSet(2, qf.createChildStep());
    Assert.assertTrue(EntityUtils.isResolver(expression));
    expression.wSet(6, qf.createPath());
    Assert.assertTrue(Matcher.matchImpl(QueriesEntityDescriptorEnum.Sequence, sequence.wGet(0)));
}
Also used : Sequence(org.whole.lang.queries.model.Sequence) Category(org.junit.experimental.categories.Category) Test(org.junit.Test)

Aggregations

Sequence (org.whole.lang.queries.model.Sequence)8 Test (org.junit.Test)7 Category (org.junit.experimental.categories.Category)5 IEntity (org.whole.lang.model.IEntity)1 QueriesEntityFactory (org.whole.lang.queries.factories.QueriesEntityFactory)1 Filter (org.whole.lang.queries.model.Filter)1 TestsEntityFactory (org.whole.lang.tests.factories.TestsEntityFactory)1 FilterRule (org.whole.lang.tests.model.FilterRule)1 FilterRule (org.whole.lang.tests.reflect.TestsEntityDescriptorEnum.FilterRule)1