Examples of when()


Examples of org.apache.isis.core.progmodel.facets.object.immutable.annotation.ImmutableFacetAnnotation.when()

        final Facet facet = facetedMethod.getFacet(ImmutableFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof ImmutableFacetAnnotation);
        final ImmutableFacetAnnotation immutableFacetAnnotation = (ImmutableFacetAnnotation) facet;
        assertEquals(When.UNTIL_PERSISTED, immutableFacetAnnotation.when());

        assertNoMethodsRemoved();
    }

}
View Full Code Here

Examples of org.apache.isis.core.progmodel.facets.object.immutable.markerifc.ImmutableFacetMarkerInterface.when()

        final Facet facet = facetedMethod.getFacet(ImmutableFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof ImmutableFacetMarkerInterface);
        final ImmutableFacetMarkerInterface immutableFacetMarkerInterface = (ImmutableFacetMarkerInterface) facet;
        assertEquals(When.ALWAYS, immutableFacetMarkerInterface.when());

        assertNoMethodsRemoved();
    }

    public void testImmutableOncePersisted() {
View Full Code Here

Examples of org.apache.isis.core.progmodel.facets.object.immutable.markerifc.ImmutableFacetMarkerInterface.when()

        final Facet facet = facetedMethod.getFacet(ImmutableFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof ImmutableFacetMarkerInterface);
        final ImmutableFacetMarkerInterface immutableFacetMarkerInterface = (ImmutableFacetMarkerInterface) facet;
        assertEquals(When.ONCE_PERSISTED, immutableFacetMarkerInterface.when());

        assertNoMethodsRemoved();
    }

    public void testImmutableUntilPersisted() {
View Full Code Here

Examples of org.apache.isis.core.progmodel.facets.object.immutable.markerifc.ImmutableFacetMarkerInterface.when()

        final Facet facet = facetedMethod.getFacet(ImmutableFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof ImmutableFacetMarkerInterface);
        final ImmutableFacetMarkerInterface immutableFacetMarkerInterface = (ImmutableFacetMarkerInterface) facet;
        assertEquals(When.UNTIL_PERSISTED, immutableFacetMarkerInterface.when());

        assertNoMethodsRemoved();
    }

    public void testNeverImmutable() {
View Full Code Here

Examples of org.apache.isis.core.progmodel.facets.object.immutable.markerifc.ImmutableFacetMarkerInterface.when()

        final Facet facet = facetedMethod.getFacet(ImmutableFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof ImmutableFacetMarkerInterface);
        final ImmutableFacetMarkerInterface immutableFacetMarkerInterface = (ImmutableFacetMarkerInterface) facet;
        assertEquals(When.NEVER, immutableFacetMarkerInterface.when());

        assertNoMethodsRemoved();
    }

}
View Full Code Here

Examples of org.apache.tapestry5.plastic.InstructionBuilder.when()

                    if (description.checkedExceptionTypes.length > 0)
                    {
                        builder.invoke(MethodInvocation.class, boolean.class, "didThrowCheckedException");

                        builder.when(Condition.NON_ZERO, new InstructionBuilderCallback()
                        {
                            public void doBuild(InstructionBuilder builder)
                            {
                                builder.loadVariable(invocation).loadTypeConstant(Exception.class);
                                builder.invokeVirtual(invocationClassName, Throwable.class.getName(),
View Full Code Here

Examples of org.givwenzen.GivWenZen.when()

 
  @Test
  public void shouldVisitCoffeeShop() throws Exception {
      GivWenZen gwz = new GivWenZenForJUnit(this);
     
    gwz.when("i go to the coffee shop");
    gwz.then("i am happy");
  }
}
View Full Code Here

Examples of org.givwenzen.experimental.GivWenZenForJUnit.when()

 
  @Test
  public void shouldVisitCoffeeShop() throws Exception {
      GivWenZen gwz = new GivWenZenForJUnit(this);
     
    gwz.when("i go to the coffee shop");
    gwz.then("i am happy");
  }
}
View Full Code Here

Examples of org.jbehave.core.configuration.Keywords.when()

    private void ensureKeywordsAreLocalised(Configuration configuration, Locale locale) {
        Keywords keywords = keywordsFor(locale, null, null);
        Map<StepType, String> startingWordsByType = keywords.startingWordsByType();
        assertThat(startingWordsByType.get(StepType.GIVEN), equalTo(keywords.given()));
        assertThat(startingWordsByType.get(StepType.WHEN), equalTo(keywords.when()));
        assertThat(startingWordsByType.get(StepType.THEN), equalTo(keywords.then()));
        assertThat(startingWordsByType.get(StepType.AND), equalTo(keywords.and()));
        assertThat(startingWordsByType.get(StepType.IGNORABLE), equalTo(keywords.ignorable()));
    }
View Full Code Here

Examples of org.jbehave.core.configuration.Keywords.when()

        ensureKeywordIs(properties, EXAMPLES_TABLE_ROW, keywords.examplesTableRow());
        ensureKeywordIs(properties, EXAMPLES_TABLE_HEADER_SEPARATOR, keywords.examplesTableHeaderSeparator());
        ensureKeywordIs(properties, EXAMPLES_TABLE_VALUE_SEPARATOR, keywords.examplesTableValueSeparator());
        ensureKeywordIs(properties, EXAMPLES_TABLE_IGNORABLE_SEPARATOR, keywords.examplesTableIgnorableSeparator());
        ensureKeywordIs(properties, GIVEN, keywords.given());
        ensureKeywordIs(properties, WHEN, keywords.when());
        ensureKeywordIs(properties, THEN, keywords.then());
        ensureKeywordIs(properties, AND, keywords.and());
        ensureKeywordIs(properties, IGNORABLE, keywords.ignorable());
        ensureKeywordIs(properties, PENDING, keywords.pending());
        ensureKeywordIs(properties, NOT_PERFORMED, keywords.notPerformed());
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.