Package edu.wpi.cs.wpisuitetng

Examples of edu.wpi.cs.wpisuitetng.Session


  @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");
    }
    assertEquals(u,temp);
  }
View Full Code Here


  }

  @Test
  @Ignore
  public void testGetAll() throws WPISuiteException {
    Project[] initial = testWithRealDB.getAll(new Session(tempUser, mockSsid));
    int initCount = initial.length;
   
    testWithRealDB.save(tempSession, add1);
    testWithRealDB.save(tempSession, add2);
    Project[] myList = testWithRealDB.getAll(new Session(tempUser, mockSsid));
    assertEquals(initCount + 2, myList.length);
  }
View Full Code Here

  }

  @Test
  @Ignore
  public void testDeleteAll() throws WPISuiteException {
    Project[] initial = testWithRealDB.getAll(new Session(tempUser, mockSsid));
    int initCount = initial.length;
   
    testWithRealDB.save(tempSession, delete1);
    testWithRealDB.save(tempSession, delete2);
    Project[] myList = testWithRealDB.getAll(new Session(tempUser, mockSsid));
    assertEquals(2, myList.length);
   
    //testWithRealDB.deleteAll(new Session(tempUser));
    myList = testWithRealDB.getAll(new Session(tempUser, mockSsid));
    assertEquals(1, myList.length);
    assertEquals(myList[0], null);
  }
View Full Code Here

   * Tests failure in update's ObjectMapper.
   * @throws WPISuiteException  on success
   */
  public void testUpdateFailure() throws WPISuiteException
  {
    Session ses = null;
    String updateString = "{ \"idNum\": \"2\", \"name\": \"proj2\",,,,,,,,,,, }"; // extra commas cause problems in ObjectMapper
   
    this.test.update(ses, updateTemp, updateString);
   
    fail("Exception should have been thrown");
View Full Code Here

TOP

Related Classes of edu.wpi.cs.wpisuitetng.Session

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.