Examples of apply()


Examples of org.jrdf.sparql.parser.node.PPrimaryExpression.apply()

    @Override
    public void caseAPrimaryExpressionUnaryExpression(APrimaryExpressionUnaryExpression node) {
        try {
            PPrimaryExpression primaryExpression = node.getPrimaryExpression();
            if (primaryExpression instanceof ABracketedExpressionPrimaryExpression) {
                primaryExpression.apply(this);
            } else {
                primaryExpression.apply(numericExpressionAnalyser);
                expression = numericExpressionAnalyser.getExpression();
            }
        } catch (ParserException e) {
View Full Code Here

Examples of org.junit.experimental.categories.Categories.CategoryFilter.apply()

    @Test
    public void categoryFilterLeavesOnlyMatchingMethods()
            throws InitializationError, NoTestsRemainException {
        CategoryFilter filter = CategoryFilter.include(SlowTests.class);
        BlockJUnit4ClassRunner runner = new BlockJUnit4ClassRunner(A.class);
        filter.apply(runner);
        assertEquals(1, runner.testCount());
    }

    public static class OneFastOneSlow {
        @Category(FastTests.class)
View Full Code Here

Examples of org.junit.rules.MethodRule.apply()

        }

        protected Statement applyRuleToLastStatement(final Method method, final Object testInstance, Field field,
                                                     final LastRuleTestExecutorStatement lastStatement) throws IllegalAccessException {
            MethodRule rule = (MethodRule) field.get(testInstance);
            Statement statement = rule.apply(lastStatement, new FrameworkMethod(method), testInstance);
            return statement;
        }

        /**
         * Since a JUnit 4.7 rule may potentially deal with "unexpected"
View Full Code Here

Examples of org.junit.rules.TestRule.apply()

            if (fieldValue instanceof MethodRule) {
                // the MethodRule is known by junit 4.9 -> delegate to super-class
                statement = super.applyRuleToLastStatement(method, testInstance, field, lastStatement);
            } else if (fieldValue instanceof TestRule){
                TestRule rule = (TestRule) fieldValue;
                statement = rule.apply(lastStatement, description);
            } else {
                throw new IllegalStateException("Can only handle MethodRule and TestRule");
            }
            return statement;
        }
View Full Code Here

Examples of org.junit.runner.manipulation.Filter.apply()

    @Test
    public void testSuiteFiltering() throws Exception {
        Runner runner = Request.aClass(ExampleSuite.class).getRunner();
        Filter filter = notThisMethodName("test1");
        try {
            filter.apply(runner);
        } catch (NoTestsRemainException e) {
            return;
        }
        fail("Expected 'NoTestsRemainException' due to complete filtering");
    }
View Full Code Here

Examples of org.kiji.schema.layout.AvroSchemaResolver.apply()

      final AvroSchema first,
      final AvroSchema second
  ) throws IOException {
    final AvroSchemaResolver resolver = new SchemaTableAvroResolver(schemaTable);

    return Objects.equal(resolver.apply(first), resolver.apply(second));
  }

  /**
   * Check whether a collection of AvroSchema objects contains a given AvroSchema element, resolving
   * UIDs using the given KijiSchemaTable.
View Full Code Here

Examples of org.kiji.schema.layout.SchemaTableAvroResolver.apply()

    switch (spec.getColumnReaderSpec().getAvroReaderSchemaType()) {
      case DEFAULT: {
        final CellSchema cellSchema = layout.getCellSchema(spec.getColumn());
        final SchemaTableAvroResolver resolver =
            new SchemaTableAvroResolver(layout.getSchemaTable());
        return resolver.apply(cellSchema.getDefaultReader());
      }
      case EXPLICIT: return spec.getColumnReaderSpec().getAvroReaderSchema();
      case WRITER: return null;
      default: throw new InternalKijiError(
          "Unknown AvroReaderSchemaType: " + spec.getColumnReaderSpec().getAvroReaderSchemaType());
View Full Code Here

Examples of org.kitesdk.data.spi.FieldPartitioner.apply()

    public <E> AvroStorageKey reuseFor(E entity, EntityAccessor<E> accessor) {
      List<FieldPartitioner> partitioners = strategy.getFieldPartitioners();

      for (int i = 0; i < partitioners.size(); i++) {
        FieldPartitioner fp = partitioners.get(i);
        put(i, fp.apply(accessor.get(entity, fp.getSourceName())));
      }

      return this;
    }
  }
View Full Code Here

Examples of org.kitesdk.data.spi.partition.HashFieldPartitioner.apply()

        .build();

    StorageKey key = new StorageKey(strategy);

    key.replaceValues(Lists.<Object>newArrayList(
        hash50.apply("green"), 2013, 9, 1, "green"));
    Assert.assertEquals(Sets.newHashSet("number"),
        c.minimizeFor(key).keySet());

    // adjust the end time so that month is the last field checked
    Constraints c2 = c.toBefore("created_at",
View Full Code Here

Examples of org.libreplan.business.orders.entities.TaskSource.TaskGroupSynchronization.apply()

                taskSourceDAO.save(taskSource);
                return result;
            }

        };
        synchronization.apply(TaskSource.persistTaskSources(taskSourceDAO));
        return (TaskGroup) taskSource.getTask();
    }

    private Date plusDays(Date today, int days) {
        LocalDate result = LocalDate.fromDateFields(today)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.