Package org.jtalks.common.model.entity

Examples of org.jtalks.common.model.entity.Branch


    }
   
    @Test
    public void testDeleteAllBranches() throws NotFoundException {
        Section expectedSection = new Section(SECTION_NAME);
        expectedSection.addOrUpdateBranch(new Branch(null, null));
        expectedSection.addOrUpdateBranch(new Branch(null, null));
       
        when(sectionDao.isExist(SECTION_ID)).thenReturn(true);
        when(sectionDao.get(SECTION_ID)).thenReturn(expectedSection);
       
        Section actualSection = sectionService.deleteAllTopicsInSection(SECTION_ID);
View Full Code Here


    @Test
    public void getLastPostsForSectionShouldReturnListOfTheLatestPosts() {
        final int count = 42;
        JCUser user = new JCUser(USER_NAME, EMAIL, USER_PASSWORD);
        Section section = new Section(SECTION_NAME);
        Branch branch1 = new Branch("my branch", "1");
        branch1.setId(42);
        Branch branch2 = new Branch("my branch2", "2");
        branch2.setId(43);
        section.addOrUpdateBranch(branch1);
        section.addOrUpdateBranch(branch2);
        when(userService.getCurrentUser()).thenReturn(user);
        List<Long> branchIds = Arrays.asList(branch1.getId());
        when(sectionDao.getAvailableBranchIds(user, section.getBranches())).thenReturn(branchIds);
View Full Code Here

TOP

Related Classes of org.jtalks.common.model.entity.Branch

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.