Compile function Test_PSN_Services(@Test)
#pragma precomp SRP_PreCompiler

$Insert LOGICAL

Declare function PSN_Services, Error_Services
Declare subroutine PSN_Services, Error_Services

Error_Services('Clear')

GotoTest

// TODO: Code to run after each test goes here

Return TestResult or 1

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

Test GetMetrologyRecipesAndPatternsWithNullPsnNoShouldThrowError
	PSN_Services('GetMetrologyRecipesAndPatterns', '')
	Assert Error_Services('HasError') equals True$
end test

Test GetMetrologyRecipesAndPatternsWithInvalidPsnNoShouldThrowError
	PSN_Services('GetMetrologyRecipesAndPatterns', 'potato')
	Assert Error_Services('HasError') equals True$
end test

Test GetMetrologyRecipesAndPatternsWithValidPsnNoShouldReturnPrescribedValues
	Values = PSN_Services('GetMetrologyRecipesAndPatterns', 4609)
	Assert DCount(Values, @FM) equals 9
	
	Values = PSN_Services('GetMetrologyRecipesAndPatterns', 5159)
	Assert DCount(Values, @FM) equals 7
	
	Values = PSN_Services('GetMetrologyRecipesAndPatterns', 4830)
	Assert DCount(Values, @FM) equals 9
end test
