public void AddWorkshop() { personlogic.AddPerson(new Teacher("John", "Teacher", "159357")); OnlineWks owks = new OnlineWks("An Online Workshop", "How to give online workshops", DateTime.Now, 5, (Teacher)personlogic.GetPerson("159357"), "somelink"); wkscrud.AddWorkshop(owks); Assert.AreEqual(owks, wkscrud.GetWorkshop(1)); }
public async Task <ActionResult <PersonModel> > GetProfile() { var uid = new Guid(HttpContext.Request.Headers[AuthorizationHeaders.PersonUid].First()); return(await _personLogic.GetPerson(uid)); }
public ReceptionistForm() { InitializeComponent(); wslogic = new WorkshopLogic(); wscrudlogic = new WorkshopCRUDLogic(); personlogic = new PersonLogic(); enrollmentreq = new EnrollmentRequestLogic(); PersonalForm pf = new PersonalForm(wslogic, wscrudlogic, personlogic, enrollmentreq); pf.Show(); comboBoxTypeWsMan.SelectedIndex = 0; comboBoxPersonRole.SelectedIndex = 0; enrollmentreq.EnrollmentRequestEvent += new IEnrollmentRequest.EnrollmentRequestHandler(enrollmentrequest_notification); //Dummy data personlogic.AddPerson(new Teacher("John", "Teacher", "159357")); personlogic.AddPerson(new Student("Sarah", "Student", "159359")); wscrudlogic.AddWorkshop(new OnlineWks("An Online Workshop", "How to give online workshops", DateTime.Now, 5, (Teacher)personlogic.GetPerson("159357"), "somelink")); UpdateLBER(); UpdateWSListbox(); UpdatePeopleListbox(); }
public void TitleEmptyTest() { personlogic.AddPerson(new Teacher("John", "Teacher", "159357")); OnlineWks owks = new OnlineWks("", "How to give online workshops", DateTime.Now, 5, (Teacher)personlogic.GetPerson("159357"), "somelink"); }
public void AddAParticipantToAWks() { personlogic.AddPerson(new Teacher("John", "Teacher", "159357")); OnlineWks owks = new OnlineWks("An online workshop", "How to give online workshops", DateTime.Now, 5, (Teacher)personlogic.GetPerson("159357"), "somelink"); Student stu = new Student("John", "Smith", "123456"); personlogic.AddPerson(stu); wkslogic.AddParticipantToWks(owks, stu); List <Person> expected = new List <Person>() { stu }; CollectionAssert.AreEqual(expected, owks.GetParticipants()); }