SutLocale Methods

ChangeCulture

Allows to change the culture of the sut (SutCultureInfo property).

Syntax:

public CultureInfo ChangeCulture(
	string cultureString
)

Parameters:

Parameter

Description

cultureString

Type: String The culture string (e.g en-US, de-CH etc) of the system under test. (for Windows: see Additional date, time, & regional settings in Region & language settings.)

GetTimeZone

Returns the currently configured time zone Id of the system under test.

Syntax:

public string GetTimeZone()

Return Value:

The currently configured time zone

InitSutDateTime

Initializes the SutDateTime by determining the delta from the VM to the host where the testcase is run.

Syntax:

public void InitSutDateTime()

Exceptions:

Exception

Condition

The VM local time could not have been parsed. Execution aborted.

ResetSutTime

Resets the SutDateTime using the current time of the host and considering the current time zone of the system under test.

Syntax:

public void ResetSutTime()

SetSutTime

Sets the SutDateTime to the provided

Syntax:

public void SetSutTime(
    DateTime dateTime
)

Parameters:

Parameter

Description

dateTime

Type: DateTime

The dateTime you want to set your system to

SetTimeZone

Sets the time zone on the system under test to the provided time zone id. The 'tzutil' command is used to set the time zone. Consider to evaluate available time zone ids by running the command 'tzutil /l'

Example for time zone ids:

  • W. Europe Standard Time

  • GMT Standard Time

  • Pacific Standard Time

Syntax:

public void SetTimeZone(
    string timeZone
)

Parameter

Description

timeZone

Type: String

The time zone id to set.

Last updated