Click or drag to resize

TestUnitOnTestInitialize Method

Use this method for test initialization (Directory and Log objects is available)

Namespace:  SIC.Test.Helper
Assembly:  SIC.Test.Helper (in SIC.Test.Helper.dll) Version: 19.1.23.1 (19.1.23.622)
Syntax
protected virtual void OnTestInitialize()
Examples
An example that puts test environment settings
public override void OnTestInitialize()
{
    this.Log.Write("Declaration data test file for Anlagekennlinie chart...");
    string TestFileAnlagekennlinieData = this.DataDirectory + TestDataFile;
    this.Log.Write("Test file data for Anlagekennlinie chart:              \t" + TestFileAnlagekennlinieData.ToString());

    this.Log.Write("Create a new instance of easyPlan App...");
    this.AppEasyPlan = new easyPlanApp.easyPlan(Settings.ClientID);

    this.Log.Write("Import easyPlan data...");
    this.AppEasyPlan.Import(TestFileAnlagekennlinieData);

    this.Log.Write("Calculation easyPlan data...");
    this.ItemEasyPlanObjekt = this.AppEasyPlan.Calculate(this.AppEasyPlan.ImportItem);
}
See Also