Package com.nineteendrops.tracdrops.client.api.ticket.milestone

Examples of com.nineteendrops.tracdrops.client.api.ticket.milestone.Milestone


        if(parameter == null){
            throw new TracException(MessageUtils.getMessage("core.parameter.not.found", "Milestone", this.getClass().getName()));
        }

        Milestone milestone = (Milestone)parameter;

        // check for mandatory fields
        String name = milestone.getName();
        if(name == null || name.trim().equals("")){
            throw new TracException(MessageUtils.getMessage("core.parameter.not.found", "Milestone.name", this.getClass().getName()));
        }

        Date due = milestone.getDue();
        if(due == null){
            throw new TracException(MessageUtils.getMessage("core.parameter.not.found", "Milestone.due", this.getClass().getName()));
        }

        String description = milestone.getDescription();
        if(description == null){
            description = "";
        }

View Full Code Here


public class HashMapToMilestoneDecoder implements ReturnDecoder {

    public Object decode(Object result, TracProperties tracProperties, ArrayList keptParametersForDecoder) {

        HashMap map = (HashMap)result;
        Milestone milestone =  new Milestone((String)map.get(MilestoneKeys.NAME),
                                             (String)map.get(MilestoneKeys.DESCRIPTION),
                                             (Integer)map.get(MilestoneKeys.COMPLETED) == 1,
                                             (Date)map.get(MilestoneKeys.DUE));

        return milestone;
View Full Code Here

    private Log log = LogFactory.getLog(MilestoneTestCreate.class);

    public void create(){

        Milestone milestone = new Milestone("M1TESTNG", "test de create", true, new Date());

        Integer returnValue = milestoneManager.create(milestone);

        System.out.println(returnValue);
    }
View Full Code Here

    }

    @Test (dataProvider = "milestoneProvider", dependsOnMethods = "milestoneDelete")
    public void milestoneCreate(String name, String description, Date due){

        milestoneManager.create(new Milestone(name, description, false, due));
    }
View Full Code Here

TOP

Related Classes of com.nineteendrops.tracdrops.client.api.ticket.milestone.Milestone

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.