Compile function Test_Tool_Class_Services(@Test)
#pragma precomp SRP_PreCompiler

$Insert LOGICAL

Declare function Tool_Class_Services, Error_Services
Declare subroutine Tool_Class_Services, Error_Services

Error_Services('Clear')

GotoTest

Return TestResult or 1

//-----------------------------------------------------------------------------
// TESTS
//-----------------------------------------------------------------------------

Test GetNumberOfPointsForPatternWithEmptyToolClassShouldThrowError
	Tool_Class_Services('GetNumberOfPointsForPattern', '' , 'super cool pattern')
	Assert Error_Services('HasError') equals True$
End Test

Test GetNumberOfPointsForPatternWithEmptyPatternNameShouldThrowError
	Tool_Class_Services('GetNumberOfPointsForPattern', 'best tool class ever' , '')
	Assert Error_Services('HasError') equals True$
End Test

Test GetNumberOfPointsForPatternWithInvalidToolClassShouldThrowError
	Tool_Class_Services('GetNumberOfPointsForPattern', 'bestToolClassEver' , '10PT_5mm')
	Assert Error_Services('HasError') equals True$
End Test

Test GetNumberOfPointsForPatternWithInvalidPatternNameShouldThrowError
	Tool_Class_Services('GetNumberOfPointsForPattern', 'FTIR' , 'superCoolPattern')
	Assert Error_Services('HasError') equals True$
End Test

Test GetNumberOfPointsForPatternWithValidArgsShouldReturnCorrectNumberOfPoints
	ExpectedNumberOfPoints = 10
	ActualNumberOfPoints = Tool_Class_Services('GetNumberOfPointsForPattern', 'FTIR' , '10PT_5mm')
	Assert ActualNumberOfPoints equals ExpectedNumberOfPoints
End Test
