Compile function Test_MetrologyServices(@Test)
#pragma precomp SRP_PreCompiler

Declare function Metrology_Services

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

GotoTest

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

Return TestResult or 1

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

Test GetCalculatedLayerEpiProWithoutWoIsEpiProOrScannedLayerShouldReturnL2
	// GetCalculatedLayer(RDSKeyID, Machine, RunDataZone, WoIsEpiPro, ScannedLayer)
	
	CalculatedLayer = Metrology_Services('GetCalculatedLayer', 649130, 'BioRad', 2)
	Assert CalculatedLayer equals 2
end test

Test GetCalculatedLayerEpiProShouldReturnL2
	// GetCalculatedLayer(RDSKeyID, Machine, RunDataZone, WoIsEpiPro, ScannedLayer)
	
	CalculatedLayer = Metrology_Services('GetCalculatedLayer', 649130, 'BioRad', 2, 1, 1)
	Assert CalculatedLayer equals 2
end test

Test GetCalculatedLayerSingleLayerNonEpiProWithoutWoIsEpiProOrScannedLayerShouldReturnL1
	// GetCalculatedLayer(RDSKeyID, Machine, RunDataZone, WoIsEpiPro, ScannedLayer)
	
	CalculatedLayer = Metrology_Services('GetCalculatedLayer', 648685, 'BioRad', '')
	Assert CalculatedLayer equals 'L1'
end test

Test GetCalculatedLayerSingleLayerNonEpiProShouldReturnL1
	// GetCalculatedLayer(RDSKeyID, Machine, RunDataZone, WoIsEpiPro, ScannedLayer)
	
	CalculatedLayer = Metrology_Services('GetCalculatedLayer', 648685, 'BioRad', '', 0, 1)
	Assert CalculatedLayer equals 'L1'
end test

Test GetCalculatedLayerMultiLayerNonEpiProWithoutWoIsEpiProOrScannedLayerShouldReturn2
	// GetCalculatedLayer(RDSKeyID, Machine, RunDataZone, WoIsEpiPro, ScannedLayer)
	
	CalculatedLayer = Metrology_Services('GetCalculatedLayer', 649834, 'BioRad', '')
	Assert CalculatedLayer equals 2
end test

Test GetCalculatedLayerMultiLayerNonEpiProShouldReturnL1
	// GetCalculatedLayer(RDSKeyID, Machine, RunDataZone, WoIsEpiPro, ScannedLayer)
	
	CalculatedLayer = Metrology_Services('GetCalculatedLayer', 649834, 'BioRad', '', 0, 'L1')
	Assert CalculatedLayer equals 'L1'
end test
