Results 1 to 2 of 2
  1. #1
    Jonasse is offline Member
    Join Date
    Apr 2008
    Posts
    7
    Rep Power
    0

    Default Help with testing methods and classes in JUnit, using BlueJ

    Hey all,

    I need help with testing methods using JUnit. The editor we're using is BlueJ
    This is my class:
    Java Code:
    package model;
    
    import java.util.*;
    
    public class Category
    {
        private String name;
        private List<Appointment> appointments;
        private List<ToDo> toDos;
        
        public Category(String name)
        {
            this.name = name;
            appointments = new ArrayList<Appointment>();
            toDos = new ArrayList<ToDo>();
        }
        
        public String getName()
        {
            return this.name;
        }
        
        public void setName(String newName)
        {
            this.name = newName;
        }
        
        public void addAppointment(Appointment a)
        {
            appointments.add(a);
        }
        
        public void removeAppointment(Appointment a)
        {
            appointments.remove(a);
        }
        
        public void addToDo(ToDo t)
        {
            toDos.add(t);
        }
        
        public void removeToDo(ToDo t)
        {
            toDos.remove(t);
        }
        
        public List<Appointment> getAppointments()
        {
            return appointments;
        }
        
        public List<ToDo> getToDos()
        {
            return toDos;
        }
    }
    I don't even really know where to begin :(

  2. #2
    Jonasse is offline Member
    Join Date
    Apr 2008
    Posts
    7
    Rep Power
    0

    Default

    If someone can just guide me on how to tackle this, i'd very much appreciate it

Similar Threads

  1. Junit
    By Azndaddy in forum New To Java
    Replies: 6
    Last Post: 06-15-2008, 06:47 AM
  2. Testing JUnit PDE with Ant
    By keynan in forum Eclipse
    Replies: 0
    Last Post: 02-14-2008, 11:35 PM
  3. help using BlueJ
    By zoe in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 06:07 AM
  4. BlueJ 2.2.0
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 07-07-2007, 02:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •