Class DefaultPagedB2BDocumentDaoTest
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.b2bacceleratorservices.document.DefaultPagedB2BDocumentDaoTest
- All Implemented Interfaces:
JaloSessionHolder
-
Field Summary
FieldsFields 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 TypeMethodDescriptionvoidsetUp()voidvoidvoidvoidThis test will return total of 0 result, filtered by documentType "UNKNOWN"voidThis test will return total of 0 result, for unit "Services East" filtered by documentType "UNKNOWN"voidvoidvoidThis test should return all results including the documents whose documentType.displayInAllList=false.voidThis test should return all results including the documents whose documentType.displayInAllList=false.voidThis test should return only 1 result including the document whose documentType.displayInAllList=false.voidThis test should return all results except the documents whose documentType.displayInAllList=false.voidThis test returns 5 results as page size is set to 5, sorted byDocumentStatusDesc.voidvoidvoidvoidvoidvoidvoidThis test will return total of 0 results, for unit "Services West" with documentStatus "Open".voidvoidvoidvoidThis test should return only 2 results as set on pageSize, sorted by "byDueDateAsc".voidvoidThis test will return total of 1 result, filtered by documentNumber from "CRN-003" to "CRN-006" with documentStatus "Closed".voidThis test will return total of 1 result, for unit "Custom Retail" filtered by documentNumber from "DBN-001" to "DBN-002" with documentStatus "Closed".voidThis test will return total of 3 results, sorted by "byOpenAmountDesc" for the user mark.rivers@rustic-hw.com.voidThis test will return total of 3 result, for unit "Services East" filtered by documentNumber with wildcard search on "005".voidThis test returns 3 results, for unit "Pronto" sorted byDocumentNumberDesc with documentType "Invoice".voidThis test returns 1 result, since the test data contains only 1 document with type Purchase Order sorted byDocumentStatusDesc.voidThis test will return total of 2 result, filtered by date from "08/10/2013" to "08/11/2013" with documentStatus "Open", "sorted byDocumentDateAsc".voidThis test will return total of 1 result, filtered by amount from "75.30" to "76.31" with documentStatus "Open".voidThis test will return total of 1 result, for unit "Custom Retail" filtered by amount from "24" to "27" with documentStatus "Open".voidThis test will return total of 1 result, for unit "Custom Retail" filtered by date from "08/09/2013" to "08/11/2013" with documentStatus "Open".voidThis test will return total of 2 results, for unit "Pronto Services" with documentStatus "Open".voidThis test will return total of 10 results cause of the page size set to 10, sorted by "byOpenAmountDesc" with documentStatus "Open".voidvoidvoidThis test will return total of 2 results, sorted by "byOriginalAmountAsc" but on page 1.Methods 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
-
Field Details
-
sdf
-
-
Constructor Details
-
DefaultPagedB2BDocumentDaoTest
public DefaultPagedB2BDocumentDaoTest()
-
-
Method Details
-
setUp
- Throws:
Exception
-
shouldReturnAllDocumentsAscSort
public void shouldReturnAllDocumentsAscSort() -
shouldReturnAllDocumentsDescSort
public void shouldReturnAllDocumentsDescSort() -
shouldReturnOnlyDocumentsWherePurchaseOrder
public void shouldReturnOnlyDocumentsWherePurchaseOrder() -
shouldReturnOnlyDocumentsLikeNote
public void shouldReturnOnlyDocumentsLikeNote() -
shouldReturnOnlyFirstPageSortByDueDate
public void shouldReturnOnlyFirstPageSortByDueDate() -
shouldReturnSecondPageSortByAmount
public void shouldReturnSecondPageSortByAmount() -
shouldReturnDocumentAssociateToUser
public void shouldReturnDocumentAssociateToUser() -
shouldReturnOpenDocuments
public void shouldReturnOpenDocuments() -
shouldReturnProntoServicesDocuments
public void shouldReturnProntoServicesDocuments() -
shouldReturnEmptyResultForServicesWestDocuments
public void shouldReturnEmptyResultForServicesWestDocuments() -
shouldReturnDocumentsBetweenAmountRange
public void shouldReturnDocumentsBetweenAmountRange() -
shouldReturnDocumentsBetweenOpenamountRange
public void shouldReturnDocumentsBetweenOpenamountRange() -
shouldReturnDocumentsBetweenDateRange
- Throws:
ParseException
-
shouldReturnDocumentsBetweenDueDateRange
- Throws:
ParseException
-
shouldNotReturnResult
public void shouldNotReturnResult() -
shouldGetErrorCriteriaNotFound
public void shouldGetErrorCriteriaNotFound() -
shouldGetErrorInvalidPage
public void shouldGetErrorInvalidPage() -
shouldReturnAllPagedDocumentsSortedByDefaultSort
public void shouldReturnAllPagedDocumentsSortedByDefaultSort()This test should return all results except the documents whose documentType.displayInAllList=false. Total documents are 15 in the testB2bdocument.csv, but the search result will only return 14 since, documentType.displayInAllList for Statement is set to false -
shouldReturnAllPagedDocumentsFilteredByDocumentTypeSortedByDefaultSort
public void shouldReturnAllPagedDocumentsFilteredByDocumentTypeSortedByDefaultSort()This test should return all results including the documents whose documentType.displayInAllList=false. Total documents are 15 in the testB2bdocument.csv, since the search criteria is documentType, result will return all documents i.e. 15 -
shouldReturnAllPagedDocumentsFilteredByDocumentNumberRange
public void shouldReturnAllPagedDocumentsFilteredByDocumentNumberRange()This test should return all results including the documents whose documentType.displayInAllList=false. Total documents are 15 in the testB2bdocument.csv, since the search criteria is documentNumber, result will return all documents i.e. 15 -
shouldReturnAllPagedDocumentsForProntoGoodsFilteredByDocumentNumberRange
public void shouldReturnAllPagedDocumentsForProntoGoodsFilteredByDocumentNumberRange()This test should return only 1 result including the document whose documentType.displayInAllList=false. Since the search criteria is documentNumber From: STA for Unit Pronto Goods, result will return only 1 document -
shouldReturnAllPagedDocumentsSortedByDocumentStatusDesc
public void shouldReturnAllPagedDocumentsSortedByDocumentStatusDesc()This test returns 5 results as page size is set to 5, sorted byDocumentStatusDesc. -
shouldReturnPagedDocumentsWithPurchaseOrder
public void shouldReturnPagedDocumentsWithPurchaseOrder()This test returns 1 result, since the test data contains only 1 document with type Purchase Order sorted byDocumentStatusDesc. -
shouldReturnPagedDocumentsWithInvoiceForPronto
public void shouldReturnPagedDocumentsWithInvoiceForPronto()This test returns 3 results, for unit "Pronto" sorted byDocumentNumberDesc with documentType "Invoice". -
shouldReturnOnlyFirstPageSortedByDueDateAsc
public void shouldReturnOnlyFirstPageSortedByDueDateAsc()This test should return only 2 results as set on pageSize, sorted by "byDueDateAsc". It should return documents with number CRN-005 & CRN-006 as the dueDate for these documents is the earliest. -
shouldReturnSecondPageSortedByOriginalAmountAsc
public void shouldReturnSecondPageSortedByOriginalAmountAsc()This test will return total of 2 results, sorted by "byOriginalAmountAsc" but on page 1. That's why 3rd & 4th document's amount is compared. -
shouldReturnPagedDocumentAssociatedToUserSortedByOpenAmountDesc
public void shouldReturnPagedDocumentAssociatedToUserSortedByOpenAmountDesc()This test will return total of 3 results, sorted by "byOpenAmountDesc" for the user mark.rivers@rustic-hw.com. -
shouldReturnPagedOpenDocumentsSortedByOpenAmountAsc
public void shouldReturnPagedOpenDocumentsSortedByOpenAmountAsc()This test will return total of 10 results cause of the page size set to 10, sorted by "byOpenAmountDesc" with documentStatus "Open". -
shouldReturnPagedOpenDocumentsForProntoServicesSortedByCreationDateAsc
public void shouldReturnPagedOpenDocumentsForProntoServicesSortedByCreationDateAsc()This test will return total of 2 results, for unit "Pronto Services" with documentStatus "Open". -
shouldReturnNoOpenDocumentsForServicesWest
public void shouldReturnNoOpenDocumentsForServicesWest()This test will return total of 0 results, for unit "Services West" with documentStatus "Open". Since the test data does not contain any documents for Services West. -
shouldReturnPagedOpenDocumentsForAmountRange
public void shouldReturnPagedOpenDocumentsForAmountRange()This test will return total of 1 result, filtered by amount from "75.30" to "76.31" with documentStatus "Open". -
shouldReturnPagedOpenDocumentsForCustomRetailFilteredByAmountRange
public void shouldReturnPagedOpenDocumentsForCustomRetailFilteredByAmountRange()This test will return total of 1 result, for unit "Custom Retail" filtered by amount from "24" to "27" with documentStatus "Open". -
shouldReturnPagedOpenDocumentsFilteredByDateRange
This test will return total of 2 result, filtered by date from "08/10/2013" to "08/11/2013" with documentStatus "Open", "sorted byDocumentDateAsc".- Throws:
ParseException
-
shouldReturnPagedOpenDocumentsForCustomRetailFilteredByDateRange
public void shouldReturnPagedOpenDocumentsForCustomRetailFilteredByDateRange() throws ParseExceptionThis test will return total of 1 result, for unit "Custom Retail" filtered by date from "08/09/2013" to "08/11/2013" with documentStatus "Open".- Throws:
ParseException
-
shouldReturnPagedClosedDocumentsFilteredByDocumentNumberRange
public void shouldReturnPagedClosedDocumentsFilteredByDocumentNumberRange()This test will return total of 1 result, filtered by documentNumber from "CRN-003" to "CRN-006" with documentStatus "Closed". -
shouldReturnPagedClosedDocumentsForCustomRetailFilteredByDocumentNumberRange
public void shouldReturnPagedClosedDocumentsForCustomRetailFilteredByDocumentNumberRange()This test will return total of 1 result, for unit "Custom Retail" filtered by documentNumber from "DBN-001" to "DBN-002" with documentStatus "Closed". -
shouldReturnPagedDocumentsForServicesEastFilteredByDocumentNumber
public void shouldReturnPagedDocumentsForServicesEastFilteredByDocumentNumber()This test will return total of 3 result, for unit "Services East" filtered by documentNumber with wildcard search on "005". -
shouldNotReturnResultFilteredByDocumentType
public void shouldNotReturnResultFilteredByDocumentType()This test will return total of 0 result, filtered by documentType "UNKNOWN" -
shouldNotReturnResultForServicesEastFilteredByDocumentType
public void shouldNotReturnResultForServicesEastFilteredByDocumentType()This test will return total of 0 result, for unit "Services East" filtered by documentType "UNKNOWN"
-