Exemple #1
0
 public History(DateTime data, Discipline discipline, int score, Teacher teacher)
 {
     date = data;
     this.discipline = discipline;
     this.score = score;
     this.teacher = teacher;
 }
Exemple #2
0
 public override void SetUp()
 {
     base.SetUp();
     DeleteBase("t-school.ndb");
     var odb = Open("t-school.ndb");
     var query = odb.Query<Student>();
     var students = query.Execute<Student>(true);
     var numStudents = students.Count;
     var computerScience = new Course("Computer Science");
     var teacher = new Teacher("Jeremias", "Java");
     var dw1 = new Discipline("Des. Web 1", 3);
     var @is = new Discipline("Intranet/Segurança", 4);
     var std1 = new Student(20, computerScience, new DateTime(), "1cs", "Brenna");
     var h1 = new History(new DateTime(), dw1, 0, teacher);
     var h2 = new History(new DateTime(), @is, 0, teacher);
     std1.AddHistory(h1);
     std1.AddHistory(h2);
     odb.Store(std1);
     odb.Commit();
     odb.Close();
     odb = Open("t-school.ndb");
     var query1 = odb.Query<Student>();
     students = query1.Execute<Student>(true);
     odb.Close();
     AssertEquals(numStudents + 1, students.Count);
 }
Exemple #3
0
 public virtual void SetDiscipline(Discipline discipline)
 {
     this.discipline = discipline;
 }