PSEK-Fitnesse-Fixtures  2.3.x (JDK11)
nl.psek.fitnesse.fixtures.general.text.TextReaderFixture Class Reference

A fixture to read the last n-lines from a textfile, and perform checks on the returned lines, this can be used to perform checks in a logfile. More...

Public Member Functions

 TextReaderFixture ()
 
String findText (String text)
 
Boolean isTextPresentOnLine (String text)
 
String[] returnLines ()
 
void setFileToRead (String fileName) throws IOException
 
void setFileToRead (String fileName, String encoding) throws IOException
 
void setLinesToRead (int amount)
 

Private Member Functions

String[] readLastLinesFromfile (int maxlines)
 

Private Attributes

String fileEncoding = "UTF-8"
 
File fileToRead
 
int linesInFile
 
int linesToRead = 10
 

Detailed Description

A fixture to read the last n-lines from a textfile, and perform checks on the returned lines, this can be used to perform checks in a logfile.

Created by Pascal on 7-12-2015.

Definition at line 18 of file TextReaderFixture.java.

Constructor & Destructor Documentation

◆ TextReaderFixture()

nl.psek.fitnesse.fixtures.general.text.TextReaderFixture.TextReaderFixture ( )

Definition at line 26 of file TextReaderFixture.java.

Member Function Documentation

◆ findText()

String nl.psek.fitnesse.fixtures.general.text.TextReaderFixture.findText ( String  text)

Definition at line 55 of file TextReaderFixture.java.

◆ isTextPresentOnLine()

Boolean nl.psek.fitnesse.fixtures.general.text.TextReaderFixture.isTextPresentOnLine ( String  text)

Definition at line 66 of file TextReaderFixture.java.

◆ readLastLinesFromfile()

String[] nl.psek.fitnesse.fixtures.general.text.TextReaderFixture.readLastLinesFromfile ( int  maxlines)
private

Definition at line 77 of file TextReaderFixture.java.

◆ returnLines()

String[] nl.psek.fitnesse.fixtures.general.text.TextReaderFixture.returnLines ( )

Definition at line 50 of file TextReaderFixture.java.

◆ setFileToRead() [1/2]

void nl.psek.fitnesse.fixtures.general.text.TextReaderFixture.setFileToRead ( String  fileName) throws IOException

Definition at line 45 of file TextReaderFixture.java.

◆ setFileToRead() [2/2]

void nl.psek.fitnesse.fixtures.general.text.TextReaderFixture.setFileToRead ( String  fileName,
String  encoding 
) throws IOException

Definition at line 36 of file TextReaderFixture.java.

◆ setLinesToRead()

void nl.psek.fitnesse.fixtures.general.text.TextReaderFixture.setLinesToRead ( int  amount)

Definition at line 31 of file TextReaderFixture.java.

Member Data Documentation

◆ fileEncoding

String nl.psek.fitnesse.fixtures.general.text.TextReaderFixture.fileEncoding = "UTF-8"
private

Definition at line 23 of file TextReaderFixture.java.

◆ fileToRead

File nl.psek.fitnesse.fixtures.general.text.TextReaderFixture.fileToRead
private

Definition at line 22 of file TextReaderFixture.java.

◆ linesInFile

int nl.psek.fitnesse.fixtures.general.text.TextReaderFixture.linesInFile
private

Definition at line 21 of file TextReaderFixture.java.

◆ linesToRead

int nl.psek.fitnesse.fixtures.general.text.TextReaderFixture.linesToRead = 10
private

Definition at line 20 of file TextReaderFixture.java.


The documentation for this class was generated from the following file: