Package com.github.C204_242_DJSMT.Assignment_2.tests

Examples of com.github.C204_242_DJSMT.Assignment_2.tests.UserManagerTest


    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


  }
 
  @Test public void addtest1() {
    String name = "Class Name",desc= "Class Description";
    ClassManager.getInstance().addClass(name, desc);
    Assert.assertTrue(ClassManager.getInstance().contains(new ClassGroup(name, desc)));
  }
View Full Code Here

    Assert.assertTrue(TeachingManager.getInstance() == TeachingManager.getInstance());
  }
 
  @Test public void createDeleteTest() {
    Teacher t = new Teacher("Name");
    ClassGroup cls = new ClassGroup("Name", "description");
    Teaches te = TeachingManager.getInstance().add(t, cls);
    Assert.assertTrue(TeachingManager.getInstance().contains(te));
    Assert.assertTrue(TeachingManager.getInstance().delete(te));
    Assert.assertFalse(TeachingManager.getInstance().contains(te));
  }
View Full Code Here

  }
 
  @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

public class EnrolmentTest {
  Student testStudent = new Student("name");
  ClassGroup testClass = new ClassGroup("name", "description");
 
  @Test public void creationTest1() {
    new Enrolment(testStudent, testClass);
  }
View Full Code Here

    new Enrolment(testStudent, testClass);
  }
 
  @Test (expected=IllegalArgumentException.class)
  public void creationTest2() {
    new Enrolment(null, testClass);
  }
View Full Code Here

    new Enrolment(null, testClass);
  }
 
  @Test (expected=IllegalArgumentException.class)
  public void creationTest3() {
    new Enrolment(testStudent, null);
  }
View Full Code Here

    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

  @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

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

TOP

Related Classes of com.github.C204_242_DJSMT.Assignment_2.tests.UserManagerTest

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.