首页 文章
  • 0 votes
     answers
     views

    使用DAO对Struts2 Spring动作进行单元测试

    我正在尝试单元测试struts2操作(命中真正的数据库),但我无法成功连接到数据库 . 我是Spring的新手,项目设置在多个bean和DAO类中使用jdbctemplate . 这是我到目前为止的尝试: 测试类: public class Test extends StrutsSpringTestCase { private static final String serverURL ...
  • 15 votes
     answers
     views

    JUnit异常测试

    编辑:目前不提供JUnit 4 . 嗨,您好, 我有一个关于使用JUnit进行“智能”异常测试的问题 . 这时,我这样做: public void testGet() { SoundFileManager sfm = new SoundFileManager(); // Test adding a sound file and then getting it by id...

热门问题