Package edu.wpi.cs.wpisuitetng.modules.core.models

Examples of edu.wpi.cs.wpisuitetng.modules.core.models.Project


 
  @Before
  public void setUp() throws Exception {
    mockSsid = "abc123";
    bob = new User("bob", "bob", "1234", 1);
    testProject = new Project("test", "1");
    defaultSession = new Session(bob, testProject, mockSsid);
    defect = new Defect(1, "title", "description", bob);
    goodComment = new Comment(1, bob, "this defect is stupid, and so are you");
   
    db = new MockData(new HashSet<Object>());
View Full Code Here


    User u = current.getUser();
   
    // find the project
    ManagerLayer manager = ManagerLayer.getInstance();
    ProjectManager projects = manager.getProjects();
    Project p = null;
   
    try
    {
      p = projects.getEntityByName(current, projectName)[0];
   
View Full Code Here

  public void testRetrieveWithProjects() throws WPISuiteException{
    Data db = DataStore.getDataStore();
    User[] arr = new User[2];
    User firstUser = new User("Brian", "bgaffey", "password", 0);
    User secondUser = new User("Alex", "alex", "password1", 1);
    Project myProject = new Project("myProject", "0");
    Project notMyProject = new Project("notMyProject", "1");
    db.save(firstUser);
    db.save(myProject);
//    User result = db.retrieve(User.class, "username", "bgaffey", myProject).toArray(arr)[0];
  //  assertEquals(firstUser, result);
    db.deleteAll(firstUser);
View Full Code Here

  }
 
  private MockDataStore()
  {
    models = new ArrayList<Model>();
    models.add(new Project("test", "5"));
    models.add(new User("steve", "steve",null, 0));
    models.add(new User("fred","fred",null, 1));
    models.add(new User("jeff","jeff",null, 2));
    models.add(new User("tyler","tyler",null, 3));
    models.add(new Project("WPISUITE","0"));
    models.add(new Project("ANDROID:BEARCLAW","1"));
    models.add(new Project("WINDOWS9","2"));
    models.add(new Project("OSX:HOUSECAT","3"));
    models.add(new Project("UBUNTU_RABID_RHINO","4"));

  }
View Full Code Here

    existingDefect.setCreationDate(new Date(0));
    existingDefect.setLastModifiedDate(new Date(0));
    existingDefect.setEvents(new ArrayList<DefectEvent>());
   
    otherDefect = new Defect(2, "A defect in a different project", "", bob);
    otherProject = new Project("other", "2");
   
    testProject = new Project("test", "1");
    mockSsid = "abc123";
    defaultSession = new Session(bob, testProject, mockSsid);
   
    //need copies to simulate db4o cross-container problem
    tagCopy = new Tag("tag");
View Full Code Here

  Comment goodNewComment;
 
  @Before
  public void setUp() throws Exception {
    bob = new User("bob", "bob", "1234", 1);
    testProject = new Project("test", "1");
    mockSsid = "abc123";
    defaultSession = new Session(bob, testProject, mockSsid);
    defect = new Defect(1, "title", "description", bob);
   
    User bobCopy = new User(null, "bob", null, -1);
View Full Code Here

 
  @Before
  public void setUp() throws Exception {
    User admin = new User("admin", "admin", "1234", 27);
    admin.setRole(Role.ADMIN);
    testProject = new Project("test", "1");
    otherProject = new Project("other", "2");
    mockSsid = "abc123";
    adminSession = new Session(admin, testProject, mockSsid);
   
    existingUser = new User("joe", "joe", "1234", 2);
    existingDefect = new Defect(1, "An existing defect", "", existingUser);
View Full Code Here

    d1.getEvents().add(new DefectChangeset());
    d1.getEvents().add(new Comment());
    d1.getTags().add(new Tag("test"));
    d1copy = new Defect(1, "", "", bob);
    d2 = new Defect(2, "", "", bob);
    project = new Project("test", "1");
  }
View Full Code Here

  @Before
  public void setUp() throws WPISuiteException
  {
    test = new ProjectManager(MockDataStore.getMockDataStore());
    testWithRealDB = new ProjectManager(DataStore.getDataStore());
    delete1 = new Project("test2", "10");
    delete2 = new Project("test3", "1");
    add1 = new Project("add1", "11");
    add2 = new Project("add2", "12");
    temp = new Project("test","8");
    tempUser = new User("name", "username", "password", 1);
    tempUser.setRole(Role.ADMIN);
    temp.setPermission(Permission.WRITE, tempUser);
    updateTemp = new Project("0", "proj0");
    updateTemp.setPermission(Permission.WRITE, tempUser);
    conflict = new Project("test", "5");
    conflict.setPermission(Permission.WRITE, tempUser);
    tempSession = new Session(tempUser, mockSsid);
    json = new Gson();
  }
View Full Code Here

 
 
 
  @Test
  public void testMakeEntity() {
    Project u = null;
    temp.setPermission(Permission.WRITE, tempUser);
    try {
      u = test.makeEntity(new Session(tempUser, mockSsid), temp.toJSON());
    } catch (WPISuiteException e) {
      fail("unexpected exception");
View Full Code Here

TOP

Related Classes of edu.wpi.cs.wpisuitetng.modules.core.models.Project

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.