Examples of PoolHelper


Examples of com.bleujin.framework.db.manager.PoolHelper

    try {
      Class.forName(getDriverName());
    } catch (ClassNotFoundException ex) {
      throw new SQLException("Driver Class Not Found", ex.toString());
    }
    pHelper = new PoolHelper(getJdbcURL(), getUserId(), getUserPwd(), maxLimit);
  }
View Full Code Here

Examples of com.bleujin.framework.db.manager.PoolHelper

  private PoolHelper pHelper ;
 
  final static MySQLPoolDBManager TEST = new MySQLPoolDBManager("jdbc:mysql://localhost/test", "bleu", "redf") ;
  public MySQLPoolDBManager(String jdbcURL, String user, String passwd) {
    super(jdbcURL, user, passwd);
    this.pHelper = new PoolHelper(getJdbcURL(), getUserId(), getUserPwd(), 40) ;
  }
View Full Code Here

Examples of com.bleujin.framework.db.manager.PoolHelper

    try {
      Class.forName(getDriverName());
    } catch (ClassNotFoundException ex) {
      throw new SQLException("Driver Class Not Found", ex.toString());
    }
    pHelper = new PoolHelper(getJdbcURL(), getUserId(), getUserPwd(), maxLimit) ;
    pHelper.initPoolConnection();
  }
View Full Code Here

Examples of org.candlepin.policy.js.pool.PoolHelper

    @Test
    public void hostedParentConsumerPostCreatesNoPool() {
        Pool pool = setupVirtLimitPool();
        Entitlement e = new Entitlement(pool, consumer, 1);

        PoolHelper postHelper = mock(PoolHelper.class);
        when(config.getBoolean(ConfigProperties.STANDALONE)).thenReturn(false);
        enforcer.postEntitlement(consumer, postHelper, e);

        verify(postHelper, never()).createHostRestrictedPool(pool.getProductId(),
            pool, pool.getAttributeValue("virt_limit"));
View Full Code Here

Examples of org.candlepin.policy.js.pool.PoolHelper

        assertEquals(new Long(100), virtBonusPool.getQuantity());
        assertEquals("true", virtBonusPool.getAttributeValue("virt_only"));
        assertEquals("10", virtBonusPool.getProductAttribute("virt_limit").getValue());

        Entitlement e = new Entitlement(physicalPool, consumer, 1);
        PoolHelper postHelper = new PoolHelper(poolManagerMock, productCache, e);
        List<Pool> poolList = new ArrayList<Pool>();
        poolList.add(virtBonusPool);
        when(poolManagerMock.lookupBySubscriptionId(eq(physicalPool.getSubscriptionId())))
            .thenReturn(poolList);
View Full Code Here

Examples of org.candlepin.policy.js.pool.PoolHelper

        assertEquals(new Long(10), physicalPool.getQuantity());
        assertEquals(0, physicalPool.getAttributes().size());

        Entitlement e = new Entitlement(physicalPool, consumer, 1);
        PoolHelper postHelper = new PoolHelper(poolManagerMock, productCache, e);

        enforcer.postEntitlement(consumer, postHelper, e);
        verify(poolManagerMock).createPool(any(Pool.class));
    }
View Full Code Here

Examples of org.candlepin.policy.js.pool.PoolHelper

        assertEquals("true", virtBonusPool.getAttributeValue("virt_only"));
        assertEquals("unlimited", virtBonusPool.getProductAttribute("virt_limit")
            .getValue());

        Entitlement e = new Entitlement(physicalPool, consumer, 1);
        PoolHelper postHelper = new PoolHelper(poolManagerMock, productCache, e);
        List<Pool> poolList = new ArrayList<Pool>();
        poolList.add(virtBonusPool);
        when(poolManagerMock.lookupBySubscriptionId(eq(physicalPool.getSubscriptionId())))
            .thenReturn(poolList);
View Full Code Here

Examples of org.candlepin.policy.js.pool.PoolHelper

        assertEquals("true", virtBonusPool.getAttributeValue("virt_only"));
        assertEquals("unlimited", virtBonusPool.getProductAttribute("virt_limit")
            .getValue());

        Entitlement e = new Entitlement(physicalPool, consumer, 1);
        PoolHelper postHelper = new PoolHelper(poolManagerMock, productCache, e);

        enforcer.postEntitlement(consumer, postHelper, e);
        verify(poolManagerMock, never()).createPool(any(Pool.class));
        verify(poolManagerMock, never()).updatePoolQuantity(any(Pool.class), anyInt());
View Full Code Here

Examples of org.candlepin.policy.js.pool.PoolHelper

            .getValue());

        Entitlement e = new Entitlement(physicalPool, consumer, 10);
        physicalPool.setConsumed(10L);
        physicalPool.setExported(10L);
        PoolHelper postHelper = new PoolHelper(poolManagerMock, productCache, e);
        List<Pool> poolList = new ArrayList<Pool>();
        poolList.add(virtBonusPool);
        when(poolManagerMock.lookupBySubscriptionId(eq(physicalPool.getSubscriptionId())))
            .thenReturn(poolList);
View Full Code Here

Examples of org.candlepin.policy.js.pool.PoolHelper

        virtBonusPool.setAttribute("virt_only", "true");
        virtBonusPool.setAttribute("virt_limit", "10");
        virtBonusPool.setAttribute("pool_derived", "true");

        Entitlement e = new Entitlement(virtBonusPool, consumer, 1);
        PoolHelper postHelper = new PoolHelper(poolManagerMock, productCache, e);
        List<Pool> poolList = new ArrayList<Pool>();
        poolList.add(virtBonusPool);
        when(poolManagerMock.lookupBySubscriptionId(eq(virtBonusPool.getSubscriptionId())))
            .thenReturn(poolList);
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.