Package com.calclab.suco.client.ioc

Examples of com.calclab.suco.client.ioc.Decorator


public class DecoratorTests {

    @SuppressWarnings("unchecked")
    @Test
    public void testChain() {
  final Decorator d1 = mock(Decorator.class);
  final Decorator d2 = mock(Decorator.class);
  final Chain chain = new Chain(d1, d2);
  chain.decorate(null, null);
  verify(d1).decorate((Class) anyObject(), (Provider) anyObject());
    }
View Full Code Here


  verify(container).registerProvider(same(NoDecoration.instance), eq(Object.class), same(f1));
    }

    @Test
    public void shouldRegisterProviderWithDecorator() {
  final Decorator d = NoDecoration.instance;
  final Class<Object> cType = Object.class;
  final Provider<Object> provider = TestHelper.provider();
  builder.register(d, cType, provider);
  verify(container).registerProvider(d, cType, provider);
    }
View Full Code Here

public class DecoratorTests {

    @SuppressWarnings("unchecked")
    @Test
    public void testChain() {
  final Decorator d1 = mock(Decorator.class);
  final Decorator d2 = mock(Decorator.class);
  final Chain chain = new Chain(d1, d2);
  chain.decorate(null, null);
  verify(d1).decorate((Class) anyObject(), (Provider) anyObject());
    }
View Full Code Here

  verify(container).registerProvider(same(NoDecoration.instance), eq(Object.class), same(f1));
    }

    @Test
    public void shouldRegisterProviderWithDecorator() {
  final Decorator d = NoDecoration.instance;
  final Class<Object> cType = Object.class;
  final Provider<Object> provider = TestHelper.provider();
  builder.register(d, cType, provider);
  verify(container).registerProvider(d, cType, provider);
    }
View Full Code Here

TOP

Related Classes of com.calclab.suco.client.ioc.Decorator

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.