Package org.apache.isis.applib.spec

Examples of org.apache.isis.applib.spec.Specification


            public MySpecAnd() {
                super(alwaysSatisfied, neverSatisfied);
            }
        }
        ;
        final Specification mySpecAnd = new MySpecAnd();
        assertThat(mySpecAnd.satisfies(null), is(not(nullValue())));
        assertThat(mySpecAnd.satisfies(null), is("not satisfied"));
    }
View Full Code Here


            public MySpecAnd() {
                super(alwaysSatisfied, alwaysSatisfied);
            }
        }
        ;
        final Specification mySpecAnd = new MySpecAnd();
        assertThat(mySpecAnd.satisfies(null), is(nullValue()));
    }
View Full Code Here

            public MySpecAnd() {
                super(neverSatisfied, neverSatisfied);
            }
        }
        ;
        final Specification mySpecAnd = new MySpecAnd();
        assertThat(mySpecAnd.satisfies(null), is(not(nullValue())));
        assertThat(mySpecAnd.satisfies(null), is("not satisfied; not satisfied"));
    }
View Full Code Here

            return null;
        }
        final Class<?>[] values = annotation.value();
        final List<Specification> specifications = new ArrayList<Specification>();
        for (final Class<?> value : values) {
            final Specification specification = newSpecificationElseNull(value);
            if (specification != null) {
                specifications.add(specification);
            }
        }
        return specifications.size() > 0 ? new MustSatisfySpecificationOnParameterFacet(specifications, holder) : null;
View Full Code Here

            return null;
        }
        final Class<?>[] values = annotation.value();
        final List<Specification> specifications = new ArrayList<Specification>();
        for (final Class<?> value : values) {
            final Specification specification = newSpecificationElseNull(value);
            if (specification != null) {
                specifications.add(specification);
            }
        }
        return specifications.size() > 0 ? new MustSatisfySpecificationOnTypeFacet(specifications, holder) : null;
View Full Code Here

            return null;
        }
        final Class<?>[] values = annotation.value();
        final List<Specification> specifications = new ArrayList<Specification>();
        for (final Class<?> value : values) {
            final Specification specification = newSpecificationElseNull(value);
            if (specification != null) {
                specifications.add(specification);
            }
        }
        return specifications.size() > 0 ? new MustSatisfySpecificationOnParameterFacet(specifications, holder) : null;
View Full Code Here

            return null;
        }
        final Class<?>[] values = annotation.value();
        final List<Specification> specifications = new ArrayList<Specification>();
        for (final Class<?> value : values) {
            final Specification specification = newSpecificationElseNull(value);
            if (specification != null) {
                specifications.add(specification);
            }
        }
        return specifications.size() > 0 ? new MustSatisfySpecificationOnPropertyFacet(specifications, holder) : null;
View Full Code Here

    @Test
    public void satisfiedIfNone() {
        class MySpecAnd extends SpecificationAnd {
            public MySpecAnd() {}
        };
        Specification mySpecAnd = new MySpecAnd();
        assertThat(mySpecAnd.satisfies(null), is(nullValue()));
    }
View Full Code Here

        class MySpecAnd extends SpecificationAnd {
            public MySpecAnd() {
                super(alwaysSatisfied);
            }
        };
        Specification mySpecAnd = new MySpecAnd();
        assertThat(mySpecAnd.satisfies(null), is(nullValue()));
    }
View Full Code Here

        class MySpecAnd extends SpecificationAnd {
            public MySpecAnd() {
                super(neverSatisfied);
            }
        };
        Specification mySpecAnd = new MySpecAnd();
        assertThat(mySpecAnd.satisfies(null), is(not(nullValue())));
        assertThat(mySpecAnd.satisfies(null), is("not satisfied"));
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.applib.spec.Specification

Copyright © 2018 www.massapicom. 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.