Package com.ibatis.jpetstore.domain

Examples of com.ibatis.jpetstore.domain.Category


  public void testShouldPopulateCategoryByIdForViewing() {
    Mock catalogServiceMock = mock(CatalogService.class);
    catalogServiceMock.expects(once())
        .method("getCategory")
        .with(NOT_NULL)
        .will(returnValue(new Category()));
    catalogServiceMock.expects(once())
        .method("getProductListByCategory")
        .with(NOT_NULL)
        .will(returnValue(new PaginatedArrayList(4)));
    CatalogBean bean = new CatalogBean((CatalogService) catalogServiceMock.proxy());
View Full Code Here


    bean.setKeyword("not null");
    bean.setPageDirection("not null");
    bean.setCategoryId("not null");
    bean.setProductId("not null");
    bean.setItemId("not null");
    bean.setCategory(new Category());
    bean.setProduct(new Product());
    bean.setItem(new Item());
    bean.setCategoryList(new PaginatedArrayList(2));
    bean.setProductList(new PaginatedArrayList(2));
    bean.setItemList(new PaginatedArrayList(2));
View Full Code Here

    Mock mock = mock(CategoryDao.class);

    mock.expects(once())
        .method("getCategory")
        .with(NOT_NULL)
        .will(returnValue(new Category()));

    CatalogService service = new CatalogService((CategoryDao) mock.proxy(), null, null);
    service.getCategory("DOGS");

  }
View Full Code Here

TOP

Related Classes of com.ibatis.jpetstore.domain.Category

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.