Package org.apache.tapestry

Examples of org.apache.tapestry.Binding


    private static final Throwable _exception = new RuntimeException(MESSAGE);

    @Test
    public void to_string_and_location()
    {
        Binding inner = mockBinding();
        Location l = mockLocation();

        replay();

        InheritedBinding binding = new InheritedBinding(BINDING_DESCRIPTION, inner, l);
View Full Code Here


    }

    @Test
    public void get_success()
    {
        Binding inner = mockBinding();
        Location l = mockLocation();
        Object expected = new Object();

        train_get(inner, expected);
View Full Code Here

    }

    @Test
    public void get_failure()
    {
        Binding inner = mockBinding();
        Location l = mockLocation();

        expect(inner.get()).andThrow(_exception);

        replay();

        InheritedBinding binding = new InheritedBinding(BINDING_DESCRIPTION, inner, l);
View Full Code Here

    }

    @Test
    public void get_binding_type_success()
    {
        Binding inner = mockBinding();
        Location l = mockLocation();
        Class expected = Runnable.class;

        expect(inner.getBindingType()).andReturn(expected);

        replay();

        InheritedBinding binding = new InheritedBinding(BINDING_DESCRIPTION, inner, l);
View Full Code Here

    }

    @Test
    public void get_binding_type_failure()
    {
        Binding inner = mockBinding();
        Location l = mockLocation();
        String description = BINDING_DESCRIPTION;

        expect(inner.getBindingType()).andThrow(_exception);

        replay();

        InheritedBinding binding = new InheritedBinding(description, inner, l);
View Full Code Here

    }

    @Test
    public void is_invariant_success()
    {
        Binding inner = mockBinding();
        Location l = mockLocation();
        boolean expected = true;

        expect(inner.isInvariant()).andReturn(expected);

        replay();

        InheritedBinding binding = new InheritedBinding(BINDING_DESCRIPTION, inner, l);
View Full Code Here

    }

    @Test
    public void is_invariant_failure()
    {
        Binding inner = mockBinding();
        Location l = mockLocation();
        expect(inner.isInvariant()).andThrow(_exception);

        replay();

        InheritedBinding binding = new InheritedBinding(BINDING_DESCRIPTION, inner, l);
View Full Code Here

    }

    @Test
    public void set_success()
    {
        Binding inner = mockBinding();
        Location l = mockLocation();
        String description = BINDING_DESCRIPTION;
        Object parameter = new Object();

        inner.set(parameter);

        replay();

        InheritedBinding binding = new InheritedBinding(description, inner, l);
View Full Code Here

    }

    @Test
    public void set_failure()
    {
        Binding inner = mockBinding();
        Location l = mockLocation();
        Object parameter = new Object();

        inner.set(parameter);
        getMocksControl().andThrow(_exception);

        replay();

        InheritedBinding binding = new InheritedBinding(BINDING_DESCRIPTION, inner, l);
View Full Code Here

    }

    @Test
    public void get_annotation_success()
    {
        Binding inner = mockBinding();
        Location l = mockLocation();
        Inject inject = newMock(Inject.class);

        train_getAnnotation(inner, Inject.class, inject);
View Full Code Here

TOP

Related Classes of org.apache.tapestry.Binding

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.