Package org.springmodules.cache.mock

Examples of org.springmodules.cache.mock.MockCachingModel


  public void testOnAfterPropertiesSetWithCachingModelSourceEqualToNull()
      throws Exception {
    interceptor.setCachingModelSource(null);

    CachingModel model1 = new MockCachingModel();
    CachingModel model2 = new MockCachingModel();

    Map cachingModels = new HashMap();
    cachingModels.put("java.lang.String.indexO*", model1);
    cachingModels.put("java.lang.String.toUpperC*", model2);
    interceptor.setCachingModels(cachingModels);
View Full Code Here


  public void testOnAfterPropertiesSetWithCachingModelSourceEqualToNullAndNewModelSourceThrowingException() {
    interceptor.setCachingModelSource(null);

    Map cachingModels = new HashMap();
    cachingModels.put("indexO*", new MockCachingModel());
    interceptor.setCachingModels(cachingModels);

    try {
      interceptor.onAfterPropertiesSet();
      fail();
View Full Code Here

    invocationControl.expectAndReturn(invocation.getThis(), thisObject);

    Method method = defaultMethod();
    invocationControl.expectAndReturn(invocation.getMethod(), method);

    CachingModel expected = new MockCachingModel();
    sourceControl.expectAndReturn(source.model(method, thisObject
        .getClass()), expected);

    replayMocks();
View Full Code Here

    invocationControl.expectAndReturn(invocation.getThis(), null);

    Method method = defaultMethod();
    invocationControl.expectAndReturn(invocation.getMethod(), method);

    CachingModel expected = new MockCachingModel();
    sourceControl.expectAndReturn(source.model(method, null),
        expected);

    replayMocks();
View Full Code Here

  public NameMatchCachingModelSourceTests(String name) {
    super(name);
  }

  public void testGetCachingModel() {
    CachingModel expected = new MockCachingModel();
    models.put(method.getName(), expected);

    assertSame(expected, source.model(method, null));
  }
View Full Code Here

TOP

Related Classes of org.springmodules.cache.mock.MockCachingModel

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.