Search in sources :

Example 1 with SvCatalogServiceImpl

use of com.teachMeSkills.an15.VorobyovSergey.hwSix.Task3.services.implimentations.SvCatalogServiceImpl in project AN15 by IharDubkou.

the class MainTask3 method svCatalogServiceTest.

static void svCatalogServiceTest(SvCatalog catalog, SvUser user) {
    System.out.println("\nTest CatalogService:");
    SvCatalogServiceImpl service = new SvCatalogServiceImpl();
    service.showAllProducts(catalog);
    service.showProductsByCategory(ProductCategory.ELECTRONIC, catalog);
    // пока не знаю как здесь удобнее реализовать!!!!
    // поэтому хардкорно передаем элемент списка.
    service.addProductInBasket(user, catalog.getCatalogList().get(2));
    service.addProductInBasket(user, new SvProduct(ProductCategory.HOUSEHOLD, "Блендер", 90, ProductRank.HIGH));
    service.buyProduct(user, catalog.getCatalogList().get(2));
    System.out.println("\nЧто может пользователь:");
    for (UsersActions e : UsersActions.values()) {
        System.out.println(e);
    }
}
Also used : SvCatalogServiceImpl(com.teachMeSkills.an15.VorobyovSergey.hwSix.Task3.services.implimentations.SvCatalogServiceImpl) SvProduct(com.teachMeSkills.an15.VorobyovSergey.hwSix.Task3.models.SvProduct) UsersActions(com.teachMeSkills.an15.VorobyovSergey.hwSix.Task3.enums.UsersActions)

Aggregations

UsersActions (com.teachMeSkills.an15.VorobyovSergey.hwSix.Task3.enums.UsersActions)1 SvProduct (com.teachMeSkills.an15.VorobyovSergey.hwSix.Task3.models.SvProduct)1 SvCatalogServiceImpl (com.teachMeSkills.an15.VorobyovSergey.hwSix.Task3.services.implimentations.SvCatalogServiceImpl)1