Examples of when()


Examples of com.crawljax.core.configuration.CrawlElement.when()

                      break;
                    default:
                      break;
                  }
                } else
                  element.when(getConditionFromConfig(c));
              }
            }
          }
        }
View Full Code Here

Examples of com.jayway.restassured.specification.ResponseSpecification.when()

      for ( Entry<String, Matcher<?>> matcher : contentMatchers.entrySet() ) {
        responseSpecification.content( matcher.getKey(), matcher.getValue() );
      }
    }

    Response response = responseSpecification.when().get( gatewayPath );

    if ( contentMatchers == null || contentMatchers.isEmpty() ) {
      switch( contentType ) {
      case JSON:
        MatcherAssert.assertThat( response.getBody().asString(),
View Full Code Here

Examples of com.mysema.query.types.expr.CaseBuilder.when()

            rv.add(expr.countDistinct());
        }

        if (!(other instanceof Constant || module == Module.JDO || module == Module.RDFBEAN)) {
            CaseBuilder cases = new CaseBuilder();
            rv.add(NumberConstant.create(1).add(cases
                .when(expr.gt(10)).then(expr)
                .when(expr.between(0, 10)).then((NumberExpression<A>)other)
                .otherwise((NumberExpression<A>)other)));

            rv.add(expr
View Full Code Here

Examples of com.mysema.query.types.path.StringPath.when()

   
    @Test
    public void Case() {
        SimpleExpression<String> str = new StringPath("str");
        // nullif(str, 'xxx')
        str.when("xxx").thenNull().otherwise(str);
    }

    @Test
    public void Subclasses_Override_As() throws SecurityException, NoSuchMethodException{
        List<Class<?>> classes = Arrays.<Class<?>>asList(
View Full Code Here

Examples of net.sourceforge.stripes.validation.ValidationMethod.when()

                    // Run any of the annotated validation methods
                    Method[] validations = findCustomValidationMethods(bean.getClass());
                    for (Method validation : validations) {
                        ValidationMethod ann = validation.getAnnotation(ValidationMethod.class);

                        boolean run = (ann.when() == ValidationState.ALWAYS)
                                   || (ann.when() == ValidationState.DEFAULT && alwaysInvokeValidate)
                                   || errors.isEmpty();

                        if (run && applies(ann, ctx.getActionBeanContext().getEventName())) {
                            Class<?>[] args = validation.getParameterTypes();
View Full Code Here

Examples of net.thucydides.core.steps.samples.FluentScenarioSteps.when()

        StepEventBus.getEventBus().testSuiteStarted(MyTestCase.class);
        StepEventBus.getEventBus().testStarted("app_should_work");

        FluentScenarioSteps steps = stepFactory.getStepLibraryFor(FluentScenarioSteps.class);

        steps.when().someone().does().this_sort_of_thing();

        List<TestOutcome> results = stepListener.getTestOutcomes();
        TestOutcome testOutcome = results.get(0);

        assertThat(testOutcome.getTestSteps().get(0).getDescription(), is("When someone does this sort of thing"));
View Full Code Here

Examples of org.apache.isis.applib.annotation.Disabled.when()

    }

    private static DisabledFacet createFromAnnotationIfPossible(final ProcessMethodContext processMethodContext) {
        final Disabled annotation = Annotations.getAnnotation(processMethodContext.getMethod(), Disabled.class);
        return annotation != null
                ? new DisabledFacetAnnotation(annotation.when(), annotation.where(), annotation.reason(), processMethodContext.getFacetHolder())
                : null;
    }

    private static DisabledFacet createFromMetadataPropertiesIfPossible(
            final ProcessContextWithMetadataProperties<? extends FacetHolder> pcwmp) {
View Full Code Here

Examples of org.apache.isis.applib.annotation.Hidden.when()

    }
   
    private static HiddenFacet createFromAnnotationIfPossible(final ProcessMethodContext processMethodContext) {
        final Hidden hiddenAnnotation = Annotations.getAnnotation(processMethodContext.getMethod(), Hidden.class);
        return hiddenAnnotation != null
                ? new HiddenFacetOnMemberAnnotation(hiddenAnnotation.when(), hiddenAnnotation.where(), processMethodContext.getFacetHolder())
                : null;
    }

    private static HiddenFacet createFromMetadataPropertiesIfPossible(
            final ProcessContextWithMetadataProperties<? extends FacetHolder> pcwmp) {
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.all.hide.HiddenFacet.when()

            memberRepr.disabled = disabledFacetRepr;
        }
        HiddenFacet hiddenFacet = assoc.getFacet(HiddenFacet.class);
        if(hiddenFacet != null && !hiddenFacet.isNoop()) {
            HiddenFacetRepr hiddenFacetRepr = new HiddenFacetRepr();
            hiddenFacetRepr.when = whenAlwaysToNull(hiddenFacet.when());
            hiddenFacetRepr.where = whereAnywhereToNull(hiddenFacet.where());
            memberRepr.hidden = hiddenFacetRepr;
        }
        MultiLineFacet multiLineFacet = assoc.getFacet(MultiLineFacet.class);
        if(multiLineFacet != null && !multiLineFacet.isNoop()) {
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.hide.HiddenFacet.when()

                public boolean accept(final ObjectAssociation association) {
                    final HiddenFacet facet = association.getFacet(HiddenFacet.class);
                    if(facet == null) {
                        return true;
                    }
                    return !(facet.where().includes(context) && facet.when() == When.ALWAYS);
                }
            };
        }

        /**
 
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.