C# Class IQMap.Tests.TestDataReader

Inheritance: IDataReader
Show file Open project: jamietre/IQMap Class Usage Examples

Public Properties

Property Type Description
CurrentRow int

Protected Properties

Property Type Description
Data List>
FieldsList List
TypesList List

Private Properties

Property Type Description
GetFieldIndex int
SetFirstRowData void
SetRandomSeed void

Public Methods

Method Description
AddFieldToMock ( string fieldName, Type type ) : void

Configure this fake datareader using a list of fields from the query

Close ( ) : void
Dispose ( ) : void
Generate ( int rows ) : void

Generate rows of random data. Make sure you've created fields with AddFieldsToMock first.

GenerateFakeDataReader ( Type type, int rows ) : IDataReader
GetBoolean ( int i ) : bool
GetByte ( int i ) : byte
GetBytes ( int i, long fieldOffset, byte buffer, int bufferoffset, int length ) : long
GetChar ( int i ) : char
GetChars ( int i, long fieldoffset, char buffer, int bufferoffset, int length ) : long
GetData ( int i ) : IDataReader
GetDataTypeName ( int i ) : string
GetDateTime ( int i ) : System.DateTime
GetDecimal ( int i ) : decimal
GetDouble ( int i ) : double
GetFieldType ( int i ) : Type
GetFloat ( int i ) : float
GetGuid ( int i ) : System.Guid
GetInt16 ( int i ) : short
GetInt32 ( int i ) : int
GetInt64 ( int i ) : long
GetName ( int i ) : string
GetOrdinal ( string name ) : int
GetPredefinedData ( Type t ) : object
GetRandomData ( Type t ) : object
GetSchemaTable ( ) : DataTable
GetString ( int i ) : string
GetValue ( int i ) : object
GetValues ( object values ) : int
IsDBNull ( int i ) : bool
NextResult ( ) : bool
Read ( ) : bool
SetFakeData ( int row, string fieldName, object value ) : void

Set the data for a specified row & field in the fake datareader

TestDataReader ( ) : System
this ( int i ) : object
this ( string name ) : object

Private Methods

Method Description
GetFieldIndex ( string fieldName ) : int
SetFirstRowData ( ) : void
SetRandomSeed ( ) : void

Method Details

AddFieldToMock() public method

Configure this fake datareader using a list of fields from the query
public AddFieldToMock ( string fieldName, Type type ) : void
fieldName string
type System.Type
return void

Close() public method

public Close ( ) : void
return void

Dispose() public method

public Dispose ( ) : void
return void

Generate() public method

Generate rows of random data. Make sure you've created fields with AddFieldsToMock first.
public Generate ( int rows ) : void
rows int
return void

GenerateFakeDataReader() public static method

public static GenerateFakeDataReader ( Type type, int rows ) : IDataReader
type System.Type
rows int
return IDataReader

GetBoolean() public method

public GetBoolean ( int i ) : bool
i int
return bool

GetByte() public method

public GetByte ( int i ) : byte
i int
return byte

GetBytes() public method

public GetBytes ( int i, long fieldOffset, byte buffer, int bufferoffset, int length ) : long
i int
fieldOffset long
buffer byte
bufferoffset int
length int
return long

GetChar() public method

public GetChar ( int i ) : char
i int
return char

GetChars() public method

public GetChars ( int i, long fieldoffset, char buffer, int bufferoffset, int length ) : long
i int
fieldoffset long
buffer char
bufferoffset int
length int
return long

GetData() public method

public GetData ( int i ) : IDataReader
i int
return IDataReader

GetDataTypeName() public method

public GetDataTypeName ( int i ) : string
i int
return string

GetDateTime() public method

public GetDateTime ( int i ) : System.DateTime
i int
return System.DateTime

GetDecimal() public method

public GetDecimal ( int i ) : decimal
i int
return decimal

GetDouble() public method

public GetDouble ( int i ) : double
i int
return double

GetFieldType() public method

public GetFieldType ( int i ) : Type
i int
return System.Type

GetFloat() public method

public GetFloat ( int i ) : float
i int
return float

GetGuid() public method

public GetGuid ( int i ) : System.Guid
i int
return System.Guid

GetInt16() public method

public GetInt16 ( int i ) : short
i int
return short

GetInt32() public method

public GetInt32 ( int i ) : int
i int
return int

GetInt64() public method

public GetInt64 ( int i ) : long
i int
return long

GetName() public method

public GetName ( int i ) : string
i int
return string

GetOrdinal() public method

public GetOrdinal ( string name ) : int
name string
return int

GetPredefinedData() public static method

public static GetPredefinedData ( Type t ) : object
t System.Type
return object

GetRandomData() public static method

public static GetRandomData ( Type t ) : object
t System.Type
return object

GetSchemaTable() public method

public GetSchemaTable ( ) : DataTable
return System.Data.DataTable

GetString() public method

public GetString ( int i ) : string
i int
return string

GetValue() public method

public GetValue ( int i ) : object
i int
return object

GetValues() public method

public GetValues ( object values ) : int
values object
return int

IsDBNull() public method

public IsDBNull ( int i ) : bool
i int
return bool

NextResult() public method

public NextResult ( ) : bool
return bool

Read() public method

public Read ( ) : bool
return bool

SetFakeData() public method

Set the data for a specified row & field in the fake datareader
public SetFakeData ( int row, string fieldName, object value ) : void
row int
fieldName string
value object
return void

TestDataReader() public method

public TestDataReader ( ) : System
return System

this() public method

public this ( int i ) : object
i int
return object

this() public method

public this ( string name ) : object
name string
return object

Property Details

CurrentRow public property

public int CurrentRow
return int

Data protected property

protected List> Data
return List>

FieldsList protected property

protected List FieldsList
return List

TypesList protected property

protected List TypesList
return List