Package nablarch.test
Class SystemPropertyResource
java.lang.Object
org.junit.rules.ExternalResource
nablarch.test.SystemPropertyResource
- All Implemented Interfaces:
- org.junit.rules.TestRule
@Published(tag="architect")
public class SystemPropertyResource
extends org.junit.rules.ExternalResource
システムプロパティの設定値を維持するクラス。
 
 
下記のようにテストクラスに記述することで、テストメソッドの実行後にシステムプロパティをテスト実行前の状態に復帰できる。
@Rule public final SystemPropertyResource systemPropertyResource = new SystemPropertyResource();
- Author:
- Koichi Asano
- 
Constructor SummaryConstructors
- 
Method SummaryMethods inherited from class org.junit.rules.ExternalResourceapply
- 
Constructor Details- 
SystemPropertyResourcepublic SystemPropertyResource()
 
- 
- 
Method Details- 
beforeprotected void before()- Overrides:
- beforein class- org.junit.rules.ExternalResource
 
- 
afterprotected void after()- Overrides:
- afterin class- org.junit.rules.ExternalResource
 
 
-