Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2013 Ning, Inc.
   *
   * Ning licenses this file to you under the Apache License, version 2.0
   * (the "License"); you may not use this file except in compliance with the
   * License.  You may obtain a copy of the License at:
   *
   *    http://www.apache.org/licenses/LICENSE-2.0
   *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
  * License for the specific language governing permissions and limitations
  * under the License.
  */
 
 package com.ning.billing.osgi.bundles.analytics.dao;
 
 
 
 
 
     @Test(groups = "slow")
     public void testSqlDaoForAccount() throws Exception {
         final BusinessAccountModelDao accountModelDao = new BusinessAccountModelDao(,
                                                                                     ,
                                                                                     new BigDecimal("1.2345"),
                                                                                     ,
                                                                                     ,
                                                                                     3,
                                                                                     ,
                                                                                     ,
                                                                                     );
 
         // Check the record doesn't exist yet
                                                                       accountModelDao.getTenantRecordId(),
                                                                       ));
 
         // Create and check we can retrieve it
         .create(accountModelDao.getTableName(), accountModelDao);
                                                                         accountModelDao.getTenantRecordId(),
                                                                         ), accountModelDao);
 
         // Delete and verify it doesn't exist anymore
         .deleteByAccountRecordId(accountModelDao.getTableName(),
                                                 accountModelDao.getAccountRecordId(),
                                                 accountModelDao.getTenantRecordId(),
                                                 );
                                                                       accountModelDao.getTenantRecordId(),
                                                                       ));
     }
 
     @Test(groups = "slow")
     public void testSqlDaoForAccountField() throws Exception {
         final BusinessFieldModelDao businessFieldModelDao = new BusinessAccountFieldModelDao(,
                                                                                              ,
                                                                                              ,
                                                                                              ,
                                                                                              ,
                                                                                              ,
                                                                                              );
         // Check the record doesn't exist yet
 
         // Create and check we can retrieve it
        .create(businessFieldModelDao.getTableName(), businessFieldModelDao);
        // Delete and verify it doesn't exist anymore
    }
    @Test(groups = "slow")
    public void testSqlDaoForBundleField() throws Exception {
        final BusinessFieldModelDao businessFieldModelDao = new BusinessBundleFieldModelDao(,
                                                                                            ,
                                                                                            ,
                                                                                            ,
                                                                                            ,
                                                                                            ,
                                                                                            );
        // Check the record doesn't exist yet
        // Create and check we can retrieve it
        .create(businessFieldModelDao.getTableName(), businessFieldModelDao);
        // Delete and verify it doesn't exist anymore
    }
    @Test(groups = "slow")
    public void testSqlDaoForInvoiceField() throws Exception {
        final BusinessFieldModelDao businessFieldModelDao = new BusinessInvoiceFieldModelDao(,
                                                                                             ,
                                                                                             ,
                                                                                             ,
                                                                                             ,
                                                                                             ,
                                                                                             );
        // Check the record doesn't exist yet
        // Create and check we can retrieve it
        .create(businessFieldModelDao.getTableName(), businessFieldModelDao);
        // Delete and verify it doesn't exist anymore
    }
    @Test(groups = "slow")
    public void testSqlDaoForInvoicePaymentField() throws Exception {
        final BusinessFieldModelDao businessFieldModelDao = new BusinessInvoicePaymentFieldModelDao(,
                                                                                                    ,
                                                                                                    ,
                                                                                                    ,
                                                                                                    ,
                                                                                                    ,
                                                                                                    );
        // Check the record doesn't exist yet
        // Create and check we can retrieve it
        .create(businessFieldModelDao.getTableName(), businessFieldModelDao);
        // Delete and verify it doesn't exist anymore
    }
    @Test(groups = "slow")
    public void testSqlDaoForInvoice() throws Exception {
        final BusinessInvoiceModelDao businessInvoiceModelDao = new BusinessInvoiceModelDao(,
                                                                                            ,
                                                                                            ,
                                                                                            ,
                                                                                            ,
                                                                                            ,
                                                                                            );
        // Check the record doesn't exist yet
        // Create and check we can retrieve it
        .create(businessInvoiceModelDao.getTableName(), businessInvoiceModelDao);
        // Delete and verify it doesn't exist anymore
    }
    @Test(groups = "slow")
    public void testSqlDaoForInvoiceItem() throws Exception {
        final BusinessInvoiceItemBaseModelDao businessInvoiceItemModelDao = BusinessInvoiceItemBaseModelDao.create(,
                                                                                                                   ,
                                                                                                                   ,
                                                                                                                   ,
                                                                                                                   ,
                                                                                                                   // ITEM_ADJ
                                                                                                                   ,
                                                                                                                   ,
                                                                                                                   ,
                                                                                                                   ,
                                                                                                                   ,
                                                                                                                   ,
                                                                                                                   ,
                                                                                                                   ,
                                                                                                                   );
        // Check the record doesn't exist yet
        // Create and check we can retrieve it
        .create(businessInvoiceItemModelDao.getTableName(), businessInvoiceItemModelDao);
        // Delete and verify it doesn't exist anymore
    }
    @Test(groups = "slow")
    public void testSqlDaoForInvoicePayment() throws Exception {
        final BusinessInvoicePaymentBaseModelDao businessInvoicePaymentModelDao = BusinessInvoicePaymentModelDao.create(,
                                                                                                                        ,
                                                                                                                        ,
                                                                                                                        ,
                                                                                                                        ,
                                                                                                                        ,
                                                                                                                        null,
                                                                                                                        ,
                                                                                                                        ,
                                                                                                                        ,
                                                                                                                        );
        // Check the record doesn't exist yet
        // Create and check we can retrieve it
        .create(businessInvoicePaymentModelDao.getTableName(), businessInvoicePaymentModelDao);
        Assert.assertEquals(.getInvoicePaymentsByAccountRecordId().get(0), businessInvoicePaymentModelDao);
        // Delete and verify it doesn't exist anymore
        .deleteByAccountRecordId(businessInvoicePaymentModelDao.getTableName(), );
    }
    @Test(groups = "slow")
    public void testSqlDaoForInvoicePaymentRefund() throws Exception {
        final BusinessInvoicePaymentBaseModelDao businessInvoicePaymentRefundModelDao = BusinessInvoicePaymentModelDao.create(,
                                                                                                                              ,
                                                                                                                              ,
                                                                                                                              ,
                                                                                                                              ,
                                                                                                                              ,
                                                                                                                              ,
                                                                                                                              ,
                                                                                                                              ,
                                                                                                                              ,
                                                                                                                              );
        // Check the record doesn't exist yet
        // Create and check we can retrieve it
        .create(businessInvoicePaymentRefundModelDao.getTableName(), businessInvoicePaymentRefundModelDao);
        Assert.assertEquals(.getInvoicePaymentRefundsByAccountRecordId().get(0), businessInvoicePaymentRefundModelDao);
        // Delete and verify it doesn't exist anymore
        .deleteByAccountRecordId(businessInvoicePaymentRefundModelDao.getTableName(), );
    }
    @Test(groups = "slow")
    public void testSqlDaoForOverdueStatus() throws Exception {
        final DateTime endDate = new DateTime(2005, 6, 5, 4, 5, 6, .);
        final BusinessOverdueStatusModelDao businessOverdueStatusModelDao = new BusinessOverdueStatusModelDao(,
                                                                                                              ,
                                                                                                              ,
                                                                                                              ,
                                                                                                              ,
                                                                                                              endDate,
                                                                                                              ,
                                                                                                              ,
                                                                                                              );
        // Check the record doesn't exist yet
        // Create and check we can retrieve it
        .create(businessOverdueStatusModelDao.getTableName(), businessOverdueStatusModelDao);
        // Delete and verify it doesn't exist anymore
    }
    @Test(groups = "slow")
    public void testSqlDaoForSubscriptionTransition() throws Exception {
        final DateTime startDate = new DateTime(2012, 6, 5, 4, 3, 12, .);
        final DateTime requestedTimestamp = new DateTime(2012, 7, 21, 10, 10, 10, .);
        final BusinessSubscriptionEvent event = BusinessSubscriptionEvent.valueOf("ADD_BASE");
        final BusinessSubscription previousSubscription = null;
        final BusinessSubscription nextSubscription = new BusinessSubscription(nullnullnull.startDate.);
        final BusinessSubscriptionTransitionModelDao businessSubscriptionTransitionModelDao = new BusinessSubscriptionTransitionModelDao(,
                                                                                                                                         ,
                                                                                                                                         ,
                                                                                                                                         ,
                                                                                                                                         ,
                                                                                                                                         requestedTimestamp,
                                                                                                                                         event,
                                                                                                                                         previousSubscription,
                                                                                                                                         nextSubscription,
                                                                                                                                         ,
                                                                                                                                         ,
                                                                                                                                         );
        // Check the record doesn't exist yet
        // Create and check we can retrieve it
        .create(businessSubscriptionTransitionModelDao.getTableName(), businessSubscriptionTransitionModelDao);
        Assert.assertEquals(.getSubscriptionTransitionsByAccountRecordId().get(0), businessSubscriptionTransitionModelDao);
        // Delete and verify it doesn't exist anymore
        .deleteByAccountRecordId(businessSubscriptionTransitionModelDao.getTableName(), );
    }
    @Test(groups = "slow")
    public void testSqlDaoForBundleSummary() throws Exception {
        final DateTime startDate = new DateTime(2012, 6, 5, 4, 3, 12, .);
        final DateTime requestedTimestamp = new DateTime(2012, 7, 21, 10, 10, 10, .);
        final BusinessSubscriptionEvent event = BusinessSubscriptionEvent.valueOf("ADD_BASE");
        final BusinessSubscription previousSubscription = null;
        final BusinessSubscription nextSubscription = new BusinessSubscription(nullnullnull.startDate.);
        final BusinessSubscriptionTransitionModelDao businessSubscriptionTransitionModelDao = new BusinessSubscriptionTransitionModelDao(,
                                                                                                                                         ,
                                                                                                                                         ,
                                                                                                                                         ,
                                                                                                                                         ,
                                                                                                                                         requestedTimestamp,
                                                                                                                                         event,
                                                                                                                                         previousSubscription,
                                                                                                                                         nextSubscription,
                                                                                                                                         ,
                                                                                                                                         ,
                                                                                                                                         );
        final BusinessBundleSummaryModelDao bundleSummaryModelDao = new BusinessBundleSummaryModelDao(,
                                                                                                      ,
                                                                                                      ,
                                                                                                      ,
                                                                                                      3,
                                                                                                      businessSubscriptionTransitionModelDao,
                                                                                                      ,
                                                                                                      ,
                                                                                                      );
        // Check the record doesn't exist yet
        // Create and check we can retrieve it
        .create(bundleSummaryModelDao.getTableName(), bundleSummaryModelDao);
        // Delete and verify it doesn't exist anymore
    }
    @Test(groups = "slow")
    public void testSqlDaoForAccountTag() throws Exception {
        final BusinessTagModelDao businessTagModelDao = new BusinessAccountTagModelDao(,
                                                                                       ,
                                                                                       ,
                                                                                       ,
                                                                                       ,
                                                                                       ,
                                                                                       ,
                                                                                       );
        // Check the record doesn't exist yet
        // Create and check we can retrieve it
        .create(businessTagModelDao.getTableName(), businessTagModelDao);
        // Delete and verify it doesn't exist anymore
    }
    @Test(groups = "slow")
    public void testSqlDaoForBundleTag() throws Exception {
        final BusinessTagModelDao businessTagModelDao = new BusinessBundleTagModelDao(,
                                                                                      ,
                                                                                      ,
                                                                                      ,
                                                                                      ,
                                                                                      ,
                                                                                      ,
                                                                                      );
        // Check the record doesn't exist yet
        // Create and check we can retrieve it
        .create(businessTagModelDao.getTableName(), businessTagModelDao);
        // Delete and verify it doesn't exist anymore
    }
    @Test(groups = "slow")
    public void testSqlDaoForInvoiceTag() throws Exception {
        final BusinessTagModelDao businessTagModelDao = new BusinessInvoiceTagModelDao(,
                                                                                       ,
                                                                                       ,
                                                                                       ,
                                                                                       ,
                                                                                       ,
                                                                                       ,
                                                                                       );
        // Check the record doesn't exist yet
        // Create and check we can retrieve it
        .create(businessTagModelDao.getTableName(), businessTagModelDao);
        // Delete and verify it doesn't exist anymore
    }
    @Test(groups = "slow")
    public void testSqlDaoForInvoicePaymentTag() throws Exception {
        final BusinessTagModelDao businessTagModelDao = new BusinessInvoicePaymentTagModelDao(,
                                                                                              ,
                                                                                              ,
                                                                                              ,
                                                                                              ,
                                                                                              ,
                                                                                              ,
                                                                                              );
        // Check the record doesn't exist yet
        // Create and check we can retrieve it
        .create(businessTagModelDao.getTableName(), businessTagModelDao);
        // Delete and verify it doesn't exist anymore
    }
New to GrepCode? Check out our FAQ X