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.accountsummaryaddon.B2BIntegrationTest
-
- de.hybris.platform.accountsummaryaddon.facade.impl.DefaultB2BAccountSummaryFacadeTest
-
- All Implemented Interfaces:
JaloSessionHolder
@IntegrationTest public class DefaultB2BAccountSummaryFacadeTest extends B2BIntegrationTest
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.accountsummaryaddon.B2BIntegrationTest
b2bUnitService, baseSiteService, sessionService, userService
-
Fields inherited from class de.hybris.platform.servicelayer.ServicelayerTest
importService
-
Fields inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
jaloSession
-
-
Constructor Summary
Constructors Constructor Description DefaultB2BAccountSummaryFacadeTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FilterByCriteriaData
createFilterByCriteriaData(java.lang.String startRange, java.lang.String endRange, java.lang.String documentTypeCode, java.lang.String documentStatus, java.lang.String filterByValue)
java.lang.String
getRange(java.lang.String range, int shift)
void
setDateRanges(java.lang.String minRange1, java.lang.String maxRange1, java.lang.String minRange2, java.lang.String maxRange2, java.lang.String minRange3, java.lang.String maxRange3, java.lang.String minRange4, java.lang.String maxRange4)
void
setUp()
void
shouldGetAmountBalanceFor2DocumentsAnd1RangeNoPastDue()
void
shouldGetAmountBalanceFor2DocumentsAnd1RangeOnePastDue()
void
shouldGetAmountBalanceFor2DocumentsAnd3RangeOnePastDue()
void
shouldGetAmountBalanceFor3DocumentsAnd3Range2PastDue()
void
shouldGetAmountBalanceFor3DocumentsAnd3Range2PastDueButOneNotIncludeInOpenBalance()
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.csvvoid
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.csvvoid
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.csvvoid
shouldGetPagedDocumentsForUnitFilteredByDocumentTypeSortedByDocumentDateAsc()
This test will return 3 documents for unit: "Pronto" filtered on documentType "Invoice" & sorted by byDocumentDateAsc based on the documents in testB2bdocument.csvvoid
shouldGetValidResult()
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.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.void
shouldIncludeStatementDocumentWhenSearchByDocumentNumber()
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 resultvoid
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 resultvoid
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.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.-
Methods inherited from class de.hybris.platform.accountsummaryaddon.B2BIntegrationTest
createPageableData, login, login
-
Methods inherited from class de.hybris.platform.servicelayer.ServicelayerTest
createCoreData, createDefaultCatalog, createDefaultUsers, createHardwareCatalog, getApplicationContext, importCsv, importData, importData, importData, importStream, importStream, isPrefetchModeNone
-
Methods inherited from class de.hybris.platform.servicelayer.ServicelayerBaseTest
autowireProperties, getBeanName, prepareApplicationContextAndSession
-
Methods inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
establishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSession
-
-
-
-
Method Detail
-
setUp
public void setUp() throws java.lang.Exception
- Throws:
java.lang.Exception
-
createFilterByCriteriaData
protected FilterByCriteriaData createFilterByCriteriaData(java.lang.String startRange, java.lang.String endRange, java.lang.String documentTypeCode, java.lang.String documentStatus, java.lang.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()
-
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(java.lang.String minRange1, java.lang.String maxRange1, java.lang.String minRange2, java.lang.String maxRange2, java.lang.String minRange3, java.lang.String maxRange3, java.lang.String minRange4, java.lang.String maxRange4)
-
getRange
public java.lang.String getRange(java.lang.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.
-
-