Class DefaultB2BAccountSummaryFacadeTest
java.lang.Object
de.hybris.platform.testframework.HybrisJUnit4Test
de.hybris.platform.servicelayer.ServicelayerBaseTest
de.hybris.platform.servicelayer.ServicelayerTest
de.hybris.platform.servicelayer.ServicelayerTransactionalTest
de.hybris.platform.b2bacceleratorservices.document.B2BIntegrationTest
de.hybris.platform.b2bacceleratorfacades.company.impl.DefaultB2BAccountSummaryFacadeTest
- All Implemented Interfaces:
JaloSessionHolder
-
Field Summary
Fields inherited from class de.hybris.platform.b2bacceleratorservices.document.B2BIntegrationTest
b2bUnitService, baseSiteService, sessionService, userServiceFields inherited from class de.hybris.platform.servicelayer.ServicelayerTest
importServiceFields inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
jaloSession -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected FilterByCriteriaDatacreateFilterByCriteriaData(String startRange, String endRange, String documentTypeCode, String documentStatus, String filterByValue) voidsetDateRanges(String minRange1, String maxRange1, String minRange2, String maxRange2, String minRange3, String maxRange3, String minRange4, String maxRange4) voidsetUp()voidvoidvoidvoidvoidvoidTest get a single document by org unit id and document numbervoidThis test with get OrgDocumentListData based on amount range filters checks if results are as expectedvoidThis test gets OrgDocumentListData based on createdAtDateRange criteriavoidThis test gets OrgDocumentListData filtered by a single value document IdvoidThis test gets OrgDocumentListData sorted by document numbers and checks if the results is correctly sortedvoidThis 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 documentTypesvoidThis test gets OrgDocumentListData based on default criteria for a unit and sort them by orgDocumentType descendingvoidThis 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.csvvoidThis 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.csvvoidThis 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.csvvoidThis test will return 3 documents for unit: "Pronto" filtered on documentType "Invoice" & sorted by byDocumentDateAsc based on the documents in testB2bdocument.csvvoidvoidThis 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.voidThis test will return 1 document for unit: "Pronto Goods" filtered on documentType "Statement" & sorted by byDocumentStatusAsc based on the documents in testB2bdocument.csv.voidvoidtest 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 resultvoidtest 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 resultvoidThis 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.voidThis test will return 3 documents for unit: "Services East" filtered on documentNumber "005" & sorted by byDocumentTypeAsc based on the documents in testB2bdocument.csv.voidThis test just checkes if the due balance amounts (string) are correctly calculated ignores the format of the values set by AmountFormatterMethods inherited from class de.hybris.platform.b2bacceleratorservices.document.B2BIntegrationTest
createPageableData, login, loginMethods inherited from class de.hybris.platform.servicelayer.ServicelayerTest
createCoreData, createDefaultCatalog, createDefaultUsers, createHardwareCatalog, getApplicationContext, importCsv, importData, importData, importData, importStream, importStream, isPrefetchModeNoneMethods inherited from class de.hybris.platform.servicelayer.ServicelayerBaseTest
autowireProperties, getBeanName, prepareApplicationContextAndSessionMethods inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
establishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSession
-
Constructor Details
-
DefaultB2BAccountSummaryFacadeTest
public DefaultB2BAccountSummaryFacadeTest()
-
-
Method Details
-
setUp
- Throws:
Exception
-
createFilterByCriteriaData
-
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
-
getRange
-
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
-