<?xml version="1.0" encoding="UTF-8"?>
<testcases version="1.0" tds_version="1.1 Rev1.27" timestamp="08-15-2005">
	<!-- Test Header/Scheme Type -->
	<testcase type="SGLN-96" name="ValidSchemeType" desc="Validate if the header corresponds to a defined coding scheme">
		<input value="001100100001010000000100100000010001000000000001001011000000000000000000000000000000000000000001" 
		filter="0" outputlevel="LEGACY"/>
		<output vamealue="gln=0073796001506;serial=1"/>
		<test-parter name="schemeType" status="PASSED" errorMsg=""/>
	</testcase>
	
	<!-- Test Output Levels -->
	<testcase type="SGLN-96" name="ValidBinaryOutput" desc="Validate binary output format">
		<input value="0073796001506" 
		filter="0" serial="1" companyprefixlength="7" outputlevel="BINARY"/>
		<output value="001100100001010000000100100000010001000000000001001011000000000000000000000000000000000000000001"/>
		<test-parameter name="binary_encoding" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-96" name="ValidTagURIOutput" desc="Validate tag URI output format">
		<input value="0073796001506" 
		filter="0" serial="1" companyprefixlength="7" outputlevel="TAG_ENCODING"/>
		<output value="urn:epc:tag:sgln-96:0.0073796.00150.1"/>
		<test-parameter name="taguri_encoding" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-96" name="ValidPureIdentityOutput" desc="Validate pure identity output format">
		<input value="0073796001506" 
		filter="0" serial="1" companyprefixlength="7" outputlevel="PURE_IDENTITY"/>
		<output value="urn:epc:id:sgln:0073796.00150.1"/>
		<test-parameter name="pureidentity_encoding" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-96" name="ValidLength" desc="Validate if the length is valid">
		<input value="001100100001010000000100100000010001000000000001001011000000000000000000000000000000000000000001" 
		filter="0" serial="1" companyprefixlength="7" outputlevel="LEGACY"/>
		<output value="gln=0073796001506;serial=1"/>
		<test-parameter name="length" status="PASSED" errorMsg=""/>
	</testcase>

	<!-- Test Filter Values -->
	<testcase type="SGLN-96" name="ValidFilter-1" desc="Validate Filter Value">
		<input value="0073796001506" 
		filter="1" serial="1" companyprefixlength="7" outputlevel="BINARY"/>
		<output value="001100100011010000000100100000010001000000000001001011000000000000000000000000000000000000000001"/>
		<test-parameter name="filter" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-96" name="ValidFilter-2" desc="Validate Filter Value">
		<input value="0073796001506" 
		filter="2" serial="1" companyprefixlength="7" outputlevel="BINARY"/>
		<output value="001100100101010000000100100000010001000000000001001011000000000000000000000000000000000000000001"/>
		<test-parameter name="filter" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-96" name="ValidFilter-3" desc="Validate Filter Value">
		<input value="0073796001506" 
		filter="3" serial="1" companyprefixlength="7" outputlevel="BINARY"/>
		<output value="001100100111010000000100100000010001000000000001001011000000000000000000000000000000000000000001"/>
		<test-parameter name="filter" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-96" name="ValidFilter-4" desc="Validate Filter Value">
		<input value="0073796001506" 
		filter="4" serial="1" companyprefixlength="7" outputlevel="BINARY"/>
		<output value="001100101001010000000100100000010001000000000001001011000000000000000000000000000000000000000001"/>
		<test-parameter name="filter" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-96" name="ValidFilter-5" desc="Validate Filter Value">
		<input value="0073796001506" 
		filter="5" serial="1" companyprefixlength="7" outputlevel="BINARY"/>
		<output value="001100101011010000000100100000010001000000000001001011000000000000000000000000000000000000000001"/>
		<test-parameter name="filter" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-96" name="ValidFilter-6" desc="Validate Filter Value">
		<input value="0073796001506" 
		filter="6" serial="1" companyprefixlength="7" outputlevel="BINARY"/>
		<output value="001100101101010000000100100000010001000000000001001011000000000000000000000000000000000000000001"/>
		<test-parameter name="filter" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-96" name="ValidFilter-7" desc="Validate Filter Value">
		<input value="0073796001506" 
		filter="7" serial="1" companyprefixlength="7" outputlevel="BINARY"/>
		<output value="001100101111010000000100100000010001000000000001001011000000000000000000000000000000000000000001"/>
		<test-parameter name="filter" status="PASSED" errorMsg=""/>
	</testcase>

	<!-- Test CompanyPrefix Length -->
	<testcase type="SGLN-96" name="ValidCompanyPrefix-6" desc="Validate CompanyPrefix">
		<input value="0380040001506" 
		filter="0" serial="1" companyprefixlength="6" outputlevel="BINARY"/>
		<output value="001100100011100000100101000111010000000000000001001011000000000000000000000000000000000000000001"/>
		<test-parameter name="companyprefix" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-96" name="ValidCompanyPrefix-8" desc="Validate CompanyPrefix length">
		<input value="0841058000000" 
		filter="3" serial="1" companyprefixlength="8" outputlevel="BINARY"/>
		<output value="001100100011000001000000001010101110101000000000000000000000000000000000000000000000000000000001"/>
		<test-parameter name="companyprefix" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-96" name="ValidCompanyPrefix-9" desc="Validate CompanyPrefix length">
		<input value="0835924000007" 
		filter="3" serial="1" companyprefixlength="9" outputlevel="BINARY"/>
		<output value="001100100010110001001111101110000100110100000000000000000000000000000000000000000000000000000001"/>
		<test-parameter name="companyprefix" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-96" name="ValidCompanyPrefix-10" desc="Validate CompanyPrefix length">
		<input value="0850583001004" 
		filter="3" serial="1" companyprefixlength="10" outputlevel="BINARY"/>
		<output value="001100100010100000110010101100101101110111011001000000000000000000000000000000000000000000000001"/>
		<test-parameter name="companyprefix" status="PASSED" errorMsg=""/>
	</testcase>

	<!-- Test Location Ref -->
	<testcase type="SGLN-96" name="ValidMinLocationRef-6" desc="Validate Min Location Reference">
		<input value="0380040000000" 
		filter="0" serial="1" companyprefixlength="6" outputlevel="BINARY"/>
		<output value="001100100011100000100101000111010000000000000000000000000000000000000000000000000000000000000001"/>
		<test-parameter name="minlocationref" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-96" name="ValidMaxLocationRef-6" desc="Validate Min Location Reference">
		<input value="0380049999993" 
		filter="0" serial="1" companyprefixlength="6" outputlevel="BINARY"/>
		<output value="001100100001100000100101000111010001111010000100011111100000000000000000000000000000000000000001"/>
		<test-parameter name="minlocationref" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-96" name="ValidMinLocationRef-7" desc="Validate Location Reference">
		<input value="0073796000000" 
		filter="0" serial="1" companyprefixlength="7" outputlevel="BINARY"/>
		<output value="001100100001010000000100100000010001000000000000000000000000000000000000000000000000000000000001"/>
		<test-parameter name="minlocationref" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-96" name="ValidMaxLocationRef-7" desc="Validate Location Reference">
		<input value="0073796999995" 
		filter="0" serial="1" companyprefixlength="7" outputlevel="BINARY"/>
		<output value="001100100001010000000100100000010001001100001101001111100000000000000000000000000000000000000001"/>
		<test-parameter name="maxlocationref" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-96" name="ValidMinLocationRef-8" desc="Validate Location Reference">
		<input value="0841058000000" 
		filter="0" serial="1" companyprefixlength="8" outputlevel="BINARY"/>
		<output value="001100100011000001000000001010101110101000000000000000000000000000000000000000000000000000000001"/>
		<test-parameter name="minlocationref" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-96" name="ValidMaxLocationRef-8" desc="Validate Location Reference">
		<input value="0841058099998" 
		filter="0" serial="1" companyprefixlength="8" outputlevel="BINARY"/>
		<output value="001100100011000001000000001010101110101001001110000111100000000000000000000000000000000000000001"/>
		<test-parameter name="maxlocationref" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-96" name="ValidMinLocationRef-9" desc="Validate Location Reference">
		<input value="0835924000007" 
		filter="0" serial="1" companyprefixlength="9" outputlevel="BINARY"/>
		<output value="001100100010110001001111101110000100110100000000000000000000000000000000000000000000000000000001"/>
		<test-parameter name="minlocationref" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-96" name="ValidMaxLocationRef-9" desc="Validate Location Reference">
		<input value="0835924009992" 
		filter="0" serial="1" companyprefixlength="9" outputlevel="BINARY"/>
		<output value="001100100010110001001111101110000100110100000111110011100000000000000000000000000000000000000001"/>
		<test-parameter name="maxlocationref" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-96" name="ValidMinLocationRef-10" desc="Validate Location Reference">
		<input value="0850583001004" 
		filter="0" serial="1" companyprefixlength="10" outputlevel="BINARY"/>
		<output value="001100100010100000110010101100101101110111011001000000000000000000000000000000000000000000000001"/>
		<test-parameter name="minlocationref" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-96" name="ValidMaxLocationRef-10" desc="Validate Location Reference">
		<input value="0850583001998" 
		filter="0" serial="1" companyprefixlength="10" outputlevel="BINARY"/>
		<output value="001100100010100000110010101100101101110111011001110001100000000000000000000000000000000000000001"/>
		<test-parameter name="maxlocationref" status="PASSED" errorMsg=""/>
	</testcase>
	
	<!-- Test Serial Number -->
	<testcase type="SGLN-96" name="ValidMinSerial" desc="Validate minimum serial number value allowed">
		<input value="0073796001506" 
		filter="0" serial="0" companyprefixlength="7" outputlevel="BINARY"/>
		<output value="001100100001010000000100100000010001000000000001001011000000000000000000000000000000000000000000"/>
		<test-parameter name="serial" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-96" name="ValidMaxSerial" desc="Validate maximum serial number value allowed">
		<input value="0073796001506" 
		filter="0" serial="524287" companyprefixlength="7" outputlevel="BINARY"/>
		<output value="001100100001010000000100100000010001000000000001001011000000000000000000000001111111111111111111"/>
		<test-parameter name="serial" status="PASSED" errorMsg=""/>
	</testcase>
		
	<!-- Invalid Test Scenarios -->
	<testcase type="SGLN-96" name="InvalidSchemeType" desc="Validate if the header corresponds to a defined coding scheme"">
		<input value="111111110001010000000100100000010001000000000001001011000000000000000000000000000000000000000000" 
		filter="" outputlevel="LEGACY"/>
		<output value="" />
		<test-parameter name="schemeType" status="FAILED" errorMsg="Header value 11111111 is not currently defined in EPC Tag Data Standards"/>
	</testcase>
	<testcase type="SGLN-96" name="InvalidMinCompanyPrefixLength" desc="Validate min. company prefix length">
		<input value="0073796001506" 
		filter="0" serial="1" companyprefixlength="5" outputlevel="BINARY"/>
		<output value=""/>
		<test-parameter name="mincompanyprefixlength" status="FAILED" errorMsg="Company Prefix length cannot be less than 6 digits"/>
	</testcase>
	<testcase type="SGLN-96" name="InvalidMaxCompanyPrefixLength" desc="Validate max. company prefix length">
		<input value="0073796001506" 
		filter="0" serial="1" companyprefixlength="13" outputlevel="BINARY"/>
		<output value=""/>
		<test-parameter name="maxcompanyprefixlength" status="FAILED" errorMsg="Company Prefix length cannot be greater than 12 digits"/>
	</testcase>
	<testcase type="SGLN-96" name="InvalidLength" desc="Validate if the length is valid">
		<input value="0073796001506" 
		filter="" outputlevel="LEGACY"/>
		<output value="" />
		<test-parameter name="length" status="FAILED" errorMsg="Invalid GTIN value. Cannot be greater than 13 digits long"/>
	</testcase>
	<testcase type="SGLN-96" name="InvalidMinSerial" desc="Validate minimum serial number value allowed">
		<input value="0073796001506" 
		filter="0" serial="-1" companyprefixlength="7" outputlevel="BINARY"/>
		<output value=""/>
		<test-parameter name="serial" status="FAILED" errorMsg="Minimum serial number value cannot be less than 0"/>
	</testcase>
	<testcase type="SGLN-96" name="InvalidMaxSerial" desc="Validate maximum serial number value allowed">
		<input value="0073796001506" 
		filter="0" serial="524288" companyprefixlength="7" outputlevel="BINARY"/>
		<output value=""/>
		<test-parameter name="serial" status="FAILED" errorMsg="Maximum serial number value cannot be greater than 524287"/>
	</testcase>
	<testcase type="SGLN-96" name="InvalidFilter" desc="Validate filter value">
		<input value="0073796001506" 
		filter="8" serial="1" companyprefixlength="7" outputlevel="BINARY"/>
		<output value=""/>
		<test-parameter name="filter" status="FAILED" errorMsg="Filter value cannot be greater than 7"/>
	</testcase>
</testcases>