コード例 #1
0
  @Test
  public void testupdateJudgeTeacher() {
    ApplicationContext ctx =
        new FileSystemXmlApplicationContext("WebRoot/WEB-INF/applicationContext.xml");
    Assert.assertNotNull(ctx);
    JudgeTeacherService judgeTeacherService =
        (JudgeTeacherService) ctx.getBean("judgeTeacherService");
    Assert.assertNotNull(judgeTeacherService);
    JudgeTeacher judgeTeacher = judgeTeacherService.getJudgeTeacherByJudgeID(1);
    judgeTeacher.setJudgeCsr("4");
    judgeTeacher.setJudgeContent("heheheh");

    judgeTeacherService.updateJudgeTeacher(judgeTeacher);
  }
コード例 #2
0
  @Test
  public void testaddJudge() {
    ApplicationContext ctx =
        new FileSystemXmlApplicationContext("WebRoot/WEB-INF/applicationContext.xml");
    Assert.assertNotNull(ctx);
    JudgeTeacherService judgeTeacherService =
        (JudgeTeacherService) ctx.getBean("judgeTeacherService");
    Assert.assertNotNull(judgeTeacherService);

    JudgeTeacher judgeTeacher = new JudgeTeacher();

    judgeTeacher.setJudgeCourseID("012");
    judgeTeacher.setJudgeCsr("4");
    judgeTeacher.setJudgeOverall("1111");
    judgeTeacher.setJudgeUnit("053");
    judgeTeacher.setJudgeContent("123");
    judgeTeacher.setStudentNo("2010107");
    judgeTeacher.setTeacherNo("123");

    judgeTeacherService.addJudge(judgeTeacher);
  }