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.
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
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