Class DefaultB2BAccountSummaryFacadeTest

All Implemented Interfaces:
JaloSessionHolder

@IntegrationTest public class DefaultB2BAccountSummaryFacadeTest extends B2BIntegrationTest
  • Constructor Details

    • DefaultB2BAccountSummaryFacadeTest

      public DefaultB2BAccountSummaryFacadeTest()
  • Method Details

    • setUp

      public void setUp() throws Exception
      Throws:
      Exception
    • createFilterByCriteriaData

      protected FilterByCriteriaData createFilterByCriteriaData(String startRange, String endRange, String documentTypeCode, String documentStatus, String filterByValue)
    • shouldGetValidResult

      public void shouldGetValidResult()
    • shouldGetAmountBalanceFor2DocumentsAnd1RangeNoPastDue

      public void shouldGetAmountBalanceFor2DocumentsAnd1RangeNoPastDue()
    • shouldGetAmountBalanceFor2DocumentsAnd1RangeOnePastDue

      public void shouldGetAmountBalanceFor2DocumentsAnd1RangeOnePastDue()
    • shouldGetAmountBalanceFor2DocumentsAnd3RangeOnePastDue

      public void shouldGetAmountBalanceFor2DocumentsAnd3RangeOnePastDue()
    • shouldGetAmountBalanceFor3DocumentsAnd3Range2PastDue

      public void shouldGetAmountBalanceFor3DocumentsAnd3Range2PastDue()
    • shouldGetAmountBalanceFor3DocumentsAnd3Range2PastDueButOneNotIncludeInOpenBalance

      public void shouldGetAmountBalanceFor3DocumentsAnd3Range2PastDueButOneNotIncludeInOpenBalance()
    • testGetDueBalanceAmountsIgnoringAmountFormat

      public void testGetDueBalanceAmountsIgnoringAmountFormat()
      This test just checkes if the due balance amounts (string) are correctly calculated ignores the format of the values set by AmountFormatter
    • shouldNotIncludeStatementDocument

      public void shouldNotIncludeStatementDocument()
      test how the attribute "displayInAllList" of document type impacts the search result If the document type of one document is set to displayInAllList=false when search all open documents, this document should not be in search result
    • shouldIncludeStatementDocumentWhenSearchByDocumentNumber

      public void shouldIncludeStatementDocumentWhenSearchByDocumentNumber()
    • shouldIncludeStatementDocumentWhenSearchByDocumentType

      public void shouldIncludeStatementDocumentWhenSearchByDocumentType()
      test how the attribute "displayInAllList" of document type impacts the search result If the document type of one document is set to displayInAllList=false when search by document number or type, this document should be in search result
    • setDateRanges

      public void setDateRanges(String minRange1, String maxRange1, String minRange2, String maxRange2, String minRange3, String maxRange3, String minRange4, String maxRange4)
    • getRange

      public String getRange(String range, int shift)
    • shouldGetPagedDocumentsForUnitFilteredByAmountRange

      public void shouldGetPagedDocumentsForUnitFilteredByAmountRange()
      This test will return 2 documents for unit: "Custom Retail" filtered on amountRange from "24" to "27" & sorted by byDocumentDateAsc based on the documents in testB2bdocument.csv
    • shouldGetPagedDocumentsForUnitFilteredByDateRange

      public void shouldGetPagedDocumentsForUnitFilteredByDateRange()
      This test will return 1 document for unit: "Custom Retail" filtered on dueDateRange from "07/16/2013" to "09/16/2013" & sorted by byDocumentDateAsc based on the documents in testB2bdocument.csv
    • shouldGetPagedDocumentsForUnitFilteredByDocumentNumberSortedByDocumentNumberDesc

      public void shouldGetPagedDocumentsForUnitFilteredByDocumentNumberSortedByDocumentNumberDesc()
      This test will return 2 documents for unit: "Services East" filtered on documentNumberRange from "INV-005" onwards & sorted by byDocumentDateAsc based on the documents in testB2bdocument.csv
    • shouldGetPagedDocumentsForUnitFilteredByDocumentTypeSortedByDocumentDateAsc

      public void shouldGetPagedDocumentsForUnitFilteredByDocumentTypeSortedByDocumentDateAsc()
      This test will return 3 documents for unit: "Pronto" filtered on documentType "Invoice" & sorted by byDocumentDateAsc based on the documents in testB2bdocument.csv
    • shouldNotIncludeStatementDocumentInResult

      public void shouldNotIncludeStatementDocumentInResult()
      This test will return 2 documents for unit: "Pronto Goods" filtered on dateRange from "07/08/2013" onwards & sorted by byDocumentStatusAsc based on the documents in testB2bdocument.csv. Ideally it would have returned 3 documents, but since this unit contains a document of type Statement whose displayInAllList is set to false. So it would only return 2 documents instead of 3
    • shouldIncludeStatementDocumentInResultWhenFilteredByDocumentNumber

      public void shouldIncludeStatementDocumentInResultWhenFilteredByDocumentNumber()
      This test will return 3 documents for unit: "Pronto Goods" filtered on documentNumberRange from "CRN-003" onwards & sorted by byDocumentStatusAsc based on the documents in testB2bdocument.csv. Since we are searching on documentNumber, it would return 3 documents, including the document with documentType=Statement. When searching by documentNumber or documentType, the result documents will include documents with documentType.displayInAllList is set to false as well.
    • shouldIncludeStatementDocumentInResultWhenFilteredByDocumentType

      public void shouldIncludeStatementDocumentInResultWhenFilteredByDocumentType()
      This test will return 1 document for unit: "Pronto Goods" filtered on documentType "Statement" & sorted by byDocumentStatusAsc based on the documents in testB2bdocument.csv. Since we are searching on documentNumber, it would return 1 document. When searching by documentNumber or documentType, the result documents will include documents with documentType.displayInAllList is set to false as well.
    • shouldReturnResultWithWildCardSearchWhenFilteredByDocumentNumber

      public void shouldReturnResultWithWildCardSearchWhenFilteredByDocumentNumber()
      This test will return 3 documents for unit: "Services East" filtered on documentNumber "005" & sorted by byDocumentTypeAsc based on the documents in testB2bdocument.csv. Since we are searching on documentNumber, it would return 3 documents. When searching by documentNumber or documentType, the result documents will include documents with documentType.displayInAllList is set to false as well.
    • shouldGetOrgDocumentListWithDefaultValues

      public void shouldGetOrgDocumentListWithDefaultValues()
      This test checks if getting OrgDocumentListData with default criteria for a certain org unit returns the correct response : number of results, paginationData, sorts, default sorting list of documentTypes
    • shouldGetOrgDocumentListFilteredByAmountRange

      public void shouldGetOrgDocumentListFilteredByAmountRange()
      This test with get OrgDocumentListData based on amount range filters checks if results are as expected
    • shouldGetOrgDocumentListSortedByDocumentIds

      public void shouldGetOrgDocumentListSortedByDocumentIds()
      This test gets OrgDocumentListData sorted by document numbers and checks if the results is correctly sorted
    • shouldGetOrgDocumentListFilteredByDocumentId

      public void shouldGetOrgDocumentListFilteredByDocumentId()
      This test gets OrgDocumentListData filtered by a single value document Id
    • shouldGetOrgDocumentListFilteredByCreatedAtDateRange

      public void shouldGetOrgDocumentListFilteredByCreatedAtDateRange()
      This test gets OrgDocumentListData based on createdAtDateRange criteria
    • shouldGetOrgDocumentSortedByOrgDocumentTypeDesc

      public void shouldGetOrgDocumentSortedByOrgDocumentTypeDesc()
      This test gets OrgDocumentListData based on default criteria for a unit and sort them by orgDocumentType descending
    • shouldGetDocumentByIdForUnit

      public void shouldGetDocumentByIdForUnit()
      Test get a single document by org unit id and document number