#include <../../lib/sda.core.au3>

TestDataProvider()

Func TestDataProvider()
	Local $TestOne

	;New Test
	$TestOne = NewTest("TestDataProvider")
	;Test Settings
	$TestOne.ScreenCapture = False
	;Start Test
	$TestOne.Setup()
	;Test Report
	$TestOne.Report.Create

	;XLS Data Provider
	Local $DataXSL = $TestOne.NewDataProvider("xls","Security")
	SplashTextOn("XLS Data Provider - File " & $DataXSL.Path,"Load " & $DataXSL.Type & " Data provider")
	For $iRow = 2 To 33
		$TestOne.AddStepResult($DataXSL.GetParameter("Description",$iRow),$DataXSL.Path,1)
		SplashTextOn("XLS Data Provider - Row: " & $iRow,"Description: " & $DataXSL.GetParameter("Description",$iRow) & @CRLF & "Entry: " & @CRLF & $DataXSL.GetParameter("Entry",$iRow))
	Next
	SplashOff()

	;INI Data Provider
	Local $DataINI = $TestOne.NewDataProvider("ini","User")
	$TestOne.AddStepResult($DataINI.GetParameter("Phone"),$DataINI.Path,1)
	$TestOne.AddStepResult($DataINI.GetParameter("UserName"),$DataINI.Path,1)

	;XML Data Provider
	Local $DataXML = $TestOne.NewDataProvider("xml","data")
	$TestOne.AddStepResult($DataXML.GetParameter("Tool"),$DataXML.Path,1)
	$TestOne.AddStepResult($DataXML.GetParameter("Description"),$DataXML.Path,1)

	$TestOne.Report.Close
EndFunc