Examples of Student


Examples of com.github.C204_242_DJSMT.Assignment_2.Student

    Assert.assertFalse(UserManager.getInstance().addTeacher("NAME1"));
  }
 
  @Test public void addStudentTest1() {
    UserManager.getInstance().addStudent("NAME1");
    Assert.assertTrue(UserManager.getInstance().contains(new Student("NAME1")));
  }
View Full Code Here

Examples of com.github.C204_242_DJSMT.Assignment_2.Student

  @Test public void singletonTest() {
    Assert.assertTrue(EnrolmentManager.getInstance() == EnrolmentManager.getInstance());
  }
 
  @Test public void createDeleteTest() {
    Student s = new Student("Name");
    ClassGroup cls = new ClassGroup("name", "description");
    Enrolment enrol = EnrolmentManager.getInstance().addEnrolment(s, cls);
    Assert.assertTrue(EnrolmentManager.getInstance().contains(enrol));
    Assert.assertTrue(EnrolmentManager.getInstance().delete(enrol));
    Assert.assertFalse(EnrolmentManager.getInstance().contains(enrol));
View Full Code Here

Examples of com.github.C204_242_DJSMT.Assignment_2.Student

public class StudentTest {
 
  @Test
  public void creationTest1() {
    new Student("Name");
  }
View Full Code Here

Examples of com.github.C204_242_DJSMT.Assignment_2.Student

    new Student("Name");
  }
 
  @Test(expected=IllegalArgumentException.class)
  public void creationTest2() {
    new Student("");
  }
View Full Code Here

Examples of com.github.C204_242_DJSMT.Assignment_2.Student

    new Student("");
  }
 
  @Test(expected=IllegalArgumentException.class)
  public void creationTest3() {
    new Student(null);
  }
View Full Code Here

Examples of com.github.C204_242_DJSMT.Assignment_2.Student

  public void creationTest3() {
    new Student(null);
  }

  @Test public void equalityTest1() {
    Assert.assertTrue(new Student("Name").equals(new Student("Name")));
  }
View Full Code Here

Examples of com.github.C204_242_DJSMT.Assignment_2.Student

  @Test public void equalityTest1() {
    Assert.assertTrue(new Student("Name").equals(new Student("Name")));
  }

  @Test public void equalityTest2() {
    Assert.assertFalse(new Student("Name").equals(new Student("Different Name")));
  }
View Full Code Here

Examples of com.google.appengine.datanucleus.test.jdo.OwnedJoinsJDO.Student

public class JDOQLQueryOwnedJoinTest extends JDOTestCase {

  public void testJoinOnOneToMany_Simple() {
    Course course1 = newCourse("Biology");
    Course course2 = newCourse("Not Biology");
    Student student = newStudent(10, course1, course2);
    makePersistentInTxn(student, TXN_START_END);
    beginTxn();
    Query q = pm.newQuery(
        "select from " + Student.class.getName() + " where "
        + "courses.contains(c) && c.department == 'Biology' && "
View Full Code Here

Examples of com.google.appengine.datanucleus.test.jdo.UnownedJoinsJDO.Student

  public void testJoinOnOneToMany_Offset() {
    Course course1 = newCourse("Biology");
    makePersistentInTxn(course1, TXN_START_END);
    Course course2 = newCourse("Not Biology");
    makePersistentInTxn(course2, TXN_START_END);
    Student student = newStudent(10, course1, course2);
    makePersistentInTxn(student, TXN_START_END);
    Student student2 = newStudent(11, course1, course2);
    makePersistentInTxn(student2, TXN_START_END);
    Student student3 = newStudent(10, course1, course2);
    makePersistentInTxn(student3, TXN_START_END);
    beginTxn();
    Query q = pm.newQuery(
        "select from " + Student.class.getName() + " where "
        + "courses.contains(c) && c.department == 'Biology' && "
View Full Code Here

Examples of com.google.appengine.datanucleus.test.jpa.OwnedJoinsJPA.Student

public class JPQLQueryOwnedJoinTest extends JPATestCase {

  public void testJoinOnOneToMany_Simple() {
    Course course1 = newCourse("Biology");
    Course course2 = newCourse("Not Biology");
    Student student = newStudent(10, course1, course2);
    beginTxn();
    em.persist(student);
    commitTxn();
    beginTxn();
    Query q = em.createQuery(
        "select from " + Student.class.getName() + " s JOIN s.courses c where "
        + "c.department = 'Biology' and "
        + "s.grade = 10");
   
    assertEquals(student.getId(), ((Student) q.getSingleResult()).getId());
    commitTxn();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.