Search in sources :

Example 1 with CategoriesConfig

use of org.nzbhydra.config.CategoriesConfig in project nzbhydra2 by theotherp.

the class CategoryProviderTest method setUp.

@Before
public void setUp() throws Exception {
    List<Category> categories = new ArrayList<>();
    Category category = new Category();
    category.setName("all");
    category.setNewznabCategories(Collections.emptyList());
    categories.add(category);
    category = new Category();
    category.setName("n/a");
    category.setNewznabCategories(Collections.emptyList());
    categories.add(category);
    category = new Category();
    category.setName("3000,3030");
    category.setNewznabCategories(Arrays.asList(3000, 3030));
    categories.add(category);
    category = new Category();
    category.setName("4000");
    category.setNewznabCategories(Arrays.asList(4000));
    categories.add(category);
    category = new Category();
    category.setName("4030");
    category.setNewznabCategories(Arrays.asList(4030));
    categories.add(category);
    category = new Category();
    category.setName("4090");
    category.setSubtype(Subtype.COMIC);
    category.setNewznabCategories(Arrays.asList(4090));
    categories.add(category);
    category = new Category();
    category.setName("7020,8010");
    category.setSubtype(Subtype.ANIME);
    category.setNewznabCategories(Arrays.asList(7020, 8010));
    categories.add(category);
    BaseConfig baseConfig = new BaseConfig();
    CategoriesConfig categoriesConfig = new CategoriesConfig();
    categoriesConfig.setCategories(categories);
    baseConfig.setCategoriesConfig(categoriesConfig);
    testee.baseConfig = baseConfig;
    testee.initialize();
}
Also used : Category(org.nzbhydra.config.Category) BaseConfig(org.nzbhydra.config.BaseConfig) CategoriesConfig(org.nzbhydra.config.CategoriesConfig) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 BaseConfig (org.nzbhydra.config.BaseConfig)1 CategoriesConfig (org.nzbhydra.config.CategoriesConfig)1 Category (org.nzbhydra.config.Category)1