C# 클래스 Lucene.Net.Store.MockDirectoryWrapper.Failure

Objects that represent fail-able conditions. Objects of a derived class are created and registered with the mock directory. After register, each object will be invoked once for each first write of a file, giving the object a chance to throw anSystem.IO.IOException.
파일 보기 프로젝트 열기: paulirwin/lucene.net

보호된 프로퍼티들

프로퍼티 타입 설명
DoFail bool

공개 메소드들

메소드 설명
ClearDoFail ( ) : void
Eval ( MockDirectoryWrapper dir ) : void

eval is called on the first write of every new file.

Reset ( ) : Failure

reset should set the state of the failure to its default (freshly constructed) state. Reset is convenient for tests that want to create one failure object and then reuse it in multiple cases. this, combined with the fact that Failure subclasses are often anonymous classes makes reset difficult to do otherwise. A typical example of use is Failure failure = new Failure() { ... }; ... mock.failOn(failure.reset())

SetDoFail ( ) : void

메소드 상세

ClearDoFail() 공개 메소드

public ClearDoFail ( ) : void
리턴 void

Eval() 공개 메소드

eval is called on the first write of every new file.
public Eval ( MockDirectoryWrapper dir ) : void
dir MockDirectoryWrapper
리턴 void

Reset() 공개 메소드

reset should set the state of the failure to its default (freshly constructed) state. Reset is convenient for tests that want to create one failure object and then reuse it in multiple cases. this, combined with the fact that Failure subclasses are often anonymous classes makes reset difficult to do otherwise. A typical example of use is Failure failure = new Failure() { ... }; ... mock.failOn(failure.reset())
public Reset ( ) : Failure
리턴 Failure

SetDoFail() 공개 메소드

public SetDoFail ( ) : void
리턴 void

프로퍼티 상세

DoFail 보호되어 있는 프로퍼티

protected bool DoFail
리턴 bool