Package org.springmodules.cache.provider.jcs.JcsFlushingModel

Examples of org.springmodules.cache.provider.jcs.JcsFlushingModel.CacheStruct


      for (int i = 0; i < count; i++) {
        Element cacheElement = (Element) cacheElements.get(i);
        String cacheName = cacheElement.getAttribute("name");
        String groups = cacheElement.getAttribute("groups");

        CacheStruct cache = new CacheStruct(cacheName, groups);
        cacheStructs[i] = cache;
      }

      model.setCacheStructs(cacheStructs);
    }
View Full Code Here


    Element element = new DomElementStub("flushing");
    element.appendChild(createCacheElement("cacheOne", "pojos,daos"));
    element.appendChild(createCacheElement("cacheTwo", "services,web"));

    CacheStruct[] cacheStructs = { new CacheStruct("cacheOne", "pojos,daos"),
        new CacheStruct("cacheTwo", "services,web") };

    JcsFlushingModel expected = new JcsFlushingModel();
    expected.setCacheStructs(cacheStructs);
    expected.setFlushBeforeMethodExecution(true);
View Full Code Here

    element.appendChild(createCacheElement(cacheName, groups));

    FlushingModel actual = parser.doParseFlushingModel(element,
        flushBeforeMethodExecution);
    JcsFlushingModel expected = new JcsFlushingModel();
    expected.setCacheStruct(new CacheStruct(cacheName, groups));
    expected.setFlushBeforeMethodExecution(flushBeforeMethodExecution);

    assertEquals(expected, actual);
  }
View Full Code Here

  /**
   * @see org.springmodules.EqualsHashCodeTestCase#testEqualsHashCodeRelationship()
   */
  public void testEqualsHashCodeRelationship() {
    CacheStruct cacheStruct = new CacheStruct("main");
    model.setCacheStruct(cacheStruct);

    JcsFlushingModel model2 = new JcsFlushingModel(cacheStruct);
    assertEqualsHashCodeRelationshipIsCorrect(model, model2);

View Full Code Here

  /**
   * @see org.springmodules.EqualsHashCodeTestCase#testEqualsIsConsistent()
   */
  public void testEqualsIsConsistent() {
    CacheStruct cacheStruct = new CacheStruct("main");
    model.setCacheStruct(cacheStruct);

    JcsFlushingModel model2 = new JcsFlushingModel(cacheStruct);
    assertEquals(model, model2);

View Full Code Here

  /**
   * @see org.springmodules.EqualsHashCodeTestCase#testEqualsIsSymmetric()
   */
  public void testEqualsIsSymmetric() {
    CacheStruct cacheStruct = new CacheStruct("test", "group1,group2");
    model.setCacheStruct(cacheStruct);

    JcsFlushingModel model2 = new JcsFlushingModel(cacheStruct);
    assertEqualsIsSymmetric(model, model2);
  }
View Full Code Here

  /**
   * @see org.springmodules.EqualsHashCodeTestCase#testEqualsIsTransitive()
   */
  public void testEqualsIsTransitive() {
    CacheStruct cacheStruct = new CacheStruct("main", "group1,group2");
    model.setCacheStruct(cacheStruct);

    JcsFlushingModel model2 = new JcsFlushingModel(cacheStruct);
    JcsFlushingModel model3 = new JcsFlushingModel(cacheStruct);

View Full Code Here

  public void testEqualsNullComparison() {
    assertEqualsNullComparisonReturnsFalse(model);
  }

  public void testToString() {
    CacheStruct cacheStruct = new CacheStruct("main");
    model.setCacheStruct(cacheStruct);
    model.setFlushBeforeMethodExecution(true);

    String actual = model.getClass().getName() + "@"
        + ObjectUtils.getIdentityHexString(model) + "[cacheStructs={"
        + cacheStruct.getClass().getName() + "@"
        + ObjectUtils.getIdentityHexString(cacheStruct)
        + "[cacheName='main', groups=null]"
        + "}, flushBeforeMethodExecution=true]";
    assertEquals(model.toString(), actual);
  }
View Full Code Here

    cachingModel.setCacheName("");
    assertValidateCachingModelThrowsException();
  }

  public void testValidateFlushingModel() {
    flushingModel.setCacheStruct(new CacheStruct("test"));
    validator.validateFlushingModel(flushingModel);
  }
View Full Code Here

    flushingModel.setCacheStructs((CacheStruct[]) null);
    assertValidateFlushingModelThrowsException();
  }

  public void testValidateFlushingModelWithCacheStructArrayNotHavingCacheName() {
    flushingModel.setCacheStruct(new CacheStruct());
    assertValidateFlushingModelThrowsException();
  }
View Full Code Here

TOP

Related Classes of org.springmodules.cache.provider.jcs.JcsFlushingModel.CacheStruct

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.