Package org.vfny.geoserver.issues

Examples of org.vfny.geoserver.issues.IIssue


        issueService = (IIssueService)appContext.getBean("IssueService");
    }

    public void testAdding(){
        //add an issue
        IIssue newIssue = new Issue();
        newIssue.setDescription("test");
        newIssue.setPriority(Priority.HIGH);
        newIssue.setResolution(Resolution.IN_PROGRESS);
        newIssue.setTarget(new Target("Diagram","1"));
        List<IIssue> list = new LinkedList<IIssue>();
        list.add(newIssue);
        issueService.addIssues(list);
       
        List<IIssue> newList = (List<IIssue>)issueService.getIssues();
View Full Code Here


    }
   
    public void testModify(){
        //add one issue
        Target myTarget = new Target("Diagram","2");
        IIssue newIssue = new Issue();
        newIssue.setDescription("test");
        newIssue.setPriority(Priority.HIGH);
        newIssue.setResolution(Resolution.IN_PROGRESS);
        newIssue.setTarget(myTarget);
        List<IIssue> list = new LinkedList<IIssue>();
        list.add(newIssue);
        issueService.addIssues(list);
        int id = 0;//temp to store the id of the issue
        List<IIssue> newList = (List<IIssue>)issueService.getIssues(myTarget);
        assertNotNull(newList);
        IIssue savedIssue = newList.get(0);
        assertNotNull(savedIssue);
        id = savedIssue.getId();
        savedIssue.setDescription("newDescription");
        savedIssue.setResolution(Resolution.RESOLVED);
       
        issueService.modifyIssue(savedIssue);
       
        List<IIssue> newList2 = (List<IIssue>)issueService.getIssues(myTarget);
        assertNotNull(newList2);
        Iterator<IIssue> it2 = newList2.iterator();
        IIssue savedIssue2 = null;
        while(it2.hasNext()){
            IIssue temp = it2.next();
            if(temp.getId() == id){
                savedIssue = temp;
            }
        }
        assertNotNull(savedIssue);
        assertEquals(savedIssue.getDescription(),"newDescription");
View Full Code Here

TOP

Related Classes of org.vfny.geoserver.issues.IIssue

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.