Package com.codingcrayons.aspectfaces

Examples of com.codingcrayons.aspectfaces.AFWeaver.generate()


    AFWeaver.addStaticConfiguration(getConfig(CONFIG));
    AFWeaver afWeaver = new AFWeaver(CONFIG, new JavaInspector(Administrator.class));

    Context context = new Context(Administrator.class.getName(), null, null, null, false);

    String fragment = afWeaver.generate(context, keyA);
    assertEquals(afCache.get(keyA), fragment);
    fragment = afWeaver.generate(context, keyA);
    assertEquals(afCache.get(keyA), fragment);

    fragment = afWeaver.generate(context, new Settings(), keyB);
View Full Code Here


    Context context = new Context(Administrator.class.getName(), null, null, null, false);

    String fragment = afWeaver.generate(context, keyA);
    assertEquals(afCache.get(keyA), fragment);
    fragment = afWeaver.generate(context, keyA);
    assertEquals(afCache.get(keyA), fragment);

    fragment = afWeaver.generate(context, new Settings(), keyB);
    assertEquals(afCache.get(keyB), fragment);
    fragment = afWeaver.generate(context, new Settings(), keyB);
View Full Code Here

    String fragment = afWeaver.generate(context, keyA);
    assertEquals(afCache.get(keyA), fragment);
    fragment = afWeaver.generate(context, keyA);
    assertEquals(afCache.get(keyA), fragment);

    fragment = afWeaver.generate(context, new Settings(), keyB);
    assertEquals(afCache.get(keyB), fragment);
    fragment = afWeaver.generate(context, new Settings(), keyB);
    assertEquals(afCache.get(keyB), fragment);

    fragment = afWeaver.generate(context, regionA, keyAregA);
View Full Code Here

    fragment = afWeaver.generate(context, keyA);
    assertEquals(afCache.get(keyA), fragment);

    fragment = afWeaver.generate(context, new Settings(), keyB);
    assertEquals(afCache.get(keyB), fragment);
    fragment = afWeaver.generate(context, new Settings(), keyB);
    assertEquals(afCache.get(keyB), fragment);

    fragment = afWeaver.generate(context, regionA, keyAregA);
    assertEquals(afCache.get(regionA, keyAregA), fragment);
    fragment = afWeaver.generate(context, regionA, keyAregA);
View Full Code Here

    fragment = afWeaver.generate(context, new Settings(), keyB);
    assertEquals(afCache.get(keyB), fragment);
    fragment = afWeaver.generate(context, new Settings(), keyB);
    assertEquals(afCache.get(keyB), fragment);

    fragment = afWeaver.generate(context, regionA, keyAregA);
    assertEquals(afCache.get(regionA, keyAregA), fragment);
    fragment = afWeaver.generate(context, regionA, keyAregA);
    assertEquals(afCache.get(regionA, keyAregA), fragment);

    fragment = afWeaver.generate(context, new Settings(), regionB, keyAregB);
View Full Code Here

    fragment = afWeaver.generate(context, new Settings(), keyB);
    assertEquals(afCache.get(keyB), fragment);

    fragment = afWeaver.generate(context, regionA, keyAregA);
    assertEquals(afCache.get(regionA, keyAregA), fragment);
    fragment = afWeaver.generate(context, regionA, keyAregA);
    assertEquals(afCache.get(regionA, keyAregA), fragment);

    fragment = afWeaver.generate(context, new Settings(), regionB, keyAregB);
    assertEquals(afCache.get(regionB, keyAregB), fragment);
    fragment = afWeaver.generate(context, new Settings(), regionB, keyAregB);
View Full Code Here

    fragment = afWeaver.generate(context, regionA, keyAregA);
    assertEquals(afCache.get(regionA, keyAregA), fragment);
    fragment = afWeaver.generate(context, regionA, keyAregA);
    assertEquals(afCache.get(regionA, keyAregA), fragment);

    fragment = afWeaver.generate(context, new Settings(), regionB, keyAregB);
    assertEquals(afCache.get(regionB, keyAregB), fragment);
    fragment = afWeaver.generate(context, new Settings(), regionB, keyAregB);
    assertEquals(afCache.get(regionB, keyAregB), fragment);
  }
View Full Code Here

    fragment = afWeaver.generate(context, regionA, keyAregA);
    assertEquals(afCache.get(regionA, keyAregA), fragment);

    fragment = afWeaver.generate(context, new Settings(), regionB, keyAregB);
    assertEquals(afCache.get(regionB, keyAregB), fragment);
    fragment = afWeaver.generate(context, new Settings(), regionB, keyAregB);
    assertEquals(afCache.get(regionB, keyAregB), fragment);
  }

  @Test(expectedExceptions = CacheProviderNotSetException.class)
  public void testCacheIntegrationFail() throws AFException {
View Full Code Here

  public void testCacheIntegrationFail() throws AFException {
    Context context = new Context(Administrator.class.getName(), null, null, null, true);
    AFWeaver.addStaticConfiguration(getConfig(CONFIG));
    AFWeaver.setDefaultCacheProvider(null);
    AFWeaver afWeaver = new AFWeaver(CONFIG);
    afWeaver.generate(context, keyA);
  }

  @AfterMethod
  public void tearDown() {
    AFWeaver.reset();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.