Click or drag to resize

CsvDataSource Class

Provide data from CSV file
Inheritance Hierarchy

Namespace:  Hummingbird.TestFramework.Automation
Assembly:  Hummingbird.TestFramework.Automation (in Hummingbird.TestFramework.Automation.dll) Version: 1.2.0.0
Syntax
[SerializableAttribute]
[DataContractAttribute(Namespace = "http://www.hummingbird-alm.com/testframework/201610")]
public sealed class CsvDataSource : DataSource

The CsvDataSource type exposes the following members.

Constructors
  NameDescription
Public methodCsvDataSource
Initializes a new instance of the CsvDataSource class.
Top
Properties
  NameDescription
Public propertyDataTable
Gets a DataTable object which represents the current imported data
(Inherited from DataSource.)
Public propertyFileName
Gets or sets the File name which to import the data. If HasHeader is set to , the first row of CSV is considered as headers
Public propertyHasHeader
Gets or sets a value indicating whether the data source has header.
(Inherited from DataSource.)
Public propertyHeaders
Gets or Sets the headers. if the file data source contains header (for example, The first row of a CSV the headers), headers will be refilled after the call of ImportData. The headers can be used as an variable. For example, the token ${name} will be replace by the value where the header name is "name"
(Inherited from DataSource.)
Public propertyMaxRows
Gets or sets the maximum rows can be imported
(Inherited from DataSource.)
Public propertySeparator
Gets or sets the separator of the CSV file, the default separator depends on your localization settings. For example, for US based culture
Top
Methods
  NameDescription
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from DataSource.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodImportData
Imports the data from the Comma-separated value (CSV) File specified in FileName property.
(Overrides DataSourceImportData(TestCase).)
Public methodReadData
Fetches the next row from the Data. This function can only be called when Headers and Data are imported.
(Inherited from DataSource.)
Public methodResetCursor
Resets the current cursor to line 0, This function will be called systematically by the DataDrivenTestCase before the test.
(Inherited from DataSource.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Events
  NameDescription
Public eventPropertyChanged
Occurs when a property value changes.
(Inherited from DataSource.)
Top
Extension Methods
  NameDescription
Public Extension MethodToStringOrXml
Converts any Object to string representation in String or XML format.
(Defined by ExtensionMethods.)
Public Extension MethodToXmlString
Converts any Object to string representation in XML format.
(Defined by ExtensionMethods.)
Top
Remarks
The property FileName and Separator support token replacement.
See Also