Class DefaultCMSPageServiceTest


  • @UnitTest
    public class DefaultCMSPageServiceTest
    extends java.lang.Object
    • Constructor Detail

      • DefaultCMSPageServiceTest

        public DefaultCMSPageServiceTest()
    • Method Detail

      • setUp

        public void setUp()
                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testShouldReturnFrontendTemplateName

        public void testShouldReturnFrontendTemplateName()
      • testShouldReturnPageForProductWhenOnlyOnePageWithoutRestrictionsFound

        public void testShouldReturnPageForProductWhenOnlyOnePageWithoutRestrictionsFound()
                                                                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testShouldReturnLastProductPageByProductWhenThereAreMoreThenOnePage

        public void testShouldReturnLastProductPageByProductWhenThereAreMoreThenOnePage()
                                                                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testShouldThrowExceptionWhenNoProductPageFound

        public void testShouldThrowExceptionWhenNoProductPageFound()
                                                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • shouldReturnProductPageByProductCode

        public void shouldReturnProductPageByProductCode()
                                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • shouldThrowExceptionWhenProductCodeDoesNotExists

        public void shouldThrowExceptionWhenProductCodeDoesNotExists()
                                                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • shouldReturnPageForCategoryWhenOnlyOnePageWithoutRestrictionsFound

        public void shouldReturnPageForCategoryWhenOnlyOnePageWithoutRestrictionsFound()
                                                                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • shouldReturnLastCategoryPageByCategoryWhenThereAreMoreThenOnePage

        public void shouldReturnLastCategoryPageByCategoryWhenThereAreMoreThenOnePage()
                                                                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • shouldThrowExceptionWhenNoCategoryPageFound

        public void shouldThrowExceptionWhenNoCategoryPageFound()
                                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • shouldReturnCategoryPageByCategoryCode

        public void shouldReturnCategoryPageByCategoryCode()
                                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • shouldThrowExceptionWhenCategoryPageIsNotFoundByCode

        public void shouldThrowExceptionWhenCategoryPageIsNotFoundByCode()
                                                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • shouldReturnTheVersionedPageWhenAValidVersionUidIsPassedToGetPageForId

        public void shouldReturnTheVersionedPageWhenAValidVersionUidIsPassedToGetPageForId()
                                                                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • shouldThrowExceptionWhenAnInvalidVersionUidIsPassedToGetPageForVersionUid

        public void shouldThrowExceptionWhenAnInvalidVersionUidIsPassedToGetPageForVersionUid()
                                                                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • shouldReturnTheActualPageWhenAnInvalidVersionUidIsPassedToGetPageForId

        public void shouldReturnTheActualPageWhenAnInvalidVersionUidIsPassedToGetPageForId()
                                                                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getPageForIdWithRestrictionsShouldReturnExpectedContentPage

        public void getPageForIdWithRestrictionsShouldReturnExpectedContentPage()
                                                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getPageForIdWithRestrictionsShouldReturnExpectedCategoryPage

        public void getPageForIdWithRestrictionsShouldReturnExpectedCategoryPage()
                                                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getPageForIdWithRestrictionsShouldReturnExpectedProductPage

        public void getPageForIdWithRestrictionsShouldReturnExpectedProductPage()
                                                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getPageForIdWithRestrictionsWithNotSupportedPageTypeShouldReturnExpectedPage

        public void getPageForIdWithRestrictionsWithNotSupportedPageTypeShouldReturnExpectedPage()
                                                                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • shouldThrowExceptionWhenPageNotFoundById

        public void shouldThrowExceptionWhenPageNotFoundById()
                                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • givenAValidVersionUidShouldReturnTheConentsSlotsForPageFromCachedSessionContextProvider

        public void givenAValidVersionUidShouldReturnTheConentsSlotsForPageFromCachedSessionContextProvider()
      • givenAValidVersionUidGetContentSlotForPageShouldReturnSlotFromSessionVersionContext

        public void givenAValidVersionUidGetContentSlotForPageShouldReturnSlotFromSessionVersionContext()
                                                                                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • givenAValidVersionUidThenGetPageForCategoryShouldReturnPageForProvidedCategory

        public void givenAValidVersionUidThenGetPageForCategoryShouldReturnPageForProvidedCategory()
                                                                                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • givenAValidVersionUidThenGetPageForCategoryCodeShouldReturnPageForProvidedCategoryCode

        public void givenAValidVersionUidThenGetPageForCategoryCodeShouldReturnPageForProvidedCategoryCode()
                                                                                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • givenAValidVersionUidThenGetPageForProductShouldReturnPageForProvidedProduct

        public void givenAValidVersionUidThenGetPageForProductShouldReturnPageForProvidedProduct()
                                                                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • givenAValidVersionUidThenGetPageForProductCodeShouldReturnPageForProvidedProductCode

        public void givenAValidVersionUidThenGetPageForProductCodeShouldReturnPageForProvidedProductCode()
                                                                                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setupValidVersionUidMocks

        protected void setupValidVersionUidMocks()