一定期間更新がないため広告を表示しています
![DbUnit・2 | 作業日記](https://cdn-ak-scissors.b.st-hatena.com/image/square/2302e44c95c7e474fefb218540004f95dc47a4bb/height=288;version=1;width=512/https%3A%2F%2Fimaging.jugem.jp%2Ftemplate%2Fimg%2Fjugem_og-image.png)
DbUnit公式サイトのDbUnit - Getting StartedページにIn order to use Dbunit you are not required to extend the DBTestCase class. You can override the standard JUnit setUp() method and execute the desired operation on your database. Do something similar in teardown() if you need to perform clean-up.とあり、そのすぐ下にサンプルコードも書かれてるとおり、DbUnitの利用にDBTestCaseを継承する必要はない。ただ書かれているサンプルコードはちょっと面倒そう。DbUnitにはIDatabaseTesterというインタフェ
メモ, DBUnitと言う事で使ってみた。まずこんな事してみたDBとの接続情報をpropertiesに書く url=jdbcのURL driver=ドライバクラス名 user=ユーザー名 pass=パスワード pu=persistentunitの名前 こうしとけば、テスト用のDBが簡単に切り替えられる(JPAのPersistence Unitも含めて)からこんな事しました。で、DBUnitでやりたい事が出来る抽象クラスを作って /* * Copyright 2008 seiji. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a cop
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く