<?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-64" name="ValidSchemeType" desc="Validate if the header corresponds to a defined coding scheme">
		<input value="0000100100100000010011110000000000000100101100000000000000000001" 
		filter="0" outputlevel="LEGACY"/>
		<output value="gln=0073796001506;serial=1"/>
		<test-parameter name="schemeType" status="PASSED" errorMsg=""/>
	</testcase>
	
	<!-- Test Output Levels -->
	<testcase type="SGLN-64" name="ValidBinaryOutput" desc="Validate binary output format">
		<input value="0073796001506" 
		filter="0" serial="1" companyprefixlength="7" outputlevel="BINARY"/>
		<output value="0000100100100000010011110000000000000100101100000000000000000001"/>
		<test-parameter name="binary_encoding" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-64" 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-64:0.0073796.00150.1"/>
		<test-parameter name="taguri_encoding" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-64" 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-64" name="ValidLength" desc="Validate if the length is valid">
		<input value="0000100100100000010011110000000000000100101100000000000000000001" 
		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-64" name="ValidFilter-0" desc="Validate Filter Value">
		<input value="0073796001506" 
		filter="1" serial="1" companyprefixlength="7" outputlevel="BINARY"/>
		<output value="0000100100100000010011110000000000000100101100000000000000000001"/>
		<test-parameter name="filter" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-64" name="ValidFilter-1" desc="Validate Filter Value">
		<input value="0073796001506" 
		filter="2" serial="1" companyprefixlength="7" outputlevel="BINARY"/>
		<output value="0000100101000000010011110000000000000100101100000000000000000001"/>
		<test-parameter name="filter" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-64" name="ValidFilter-2" desc="Validate Filter Value">
		<input value="0073796001506" 
		filter="3" serial="1" companyprefixlength="7" outputlevel="BINARY"/>
		<output value="0000100101100000010011110000000000000100101100000000000000000001"/>
		<test-parameter name="filter" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-64" name="ValidFilter-4" desc="Validate Filter Value">
		<input value="0073796001506" 
		filter="4" serial="1" companyprefixlength="7" outputlevel="BINARY"/>
		<output value="0000100110000000010011110000000000000100101100000000000000000001"/>
		<test-parameter name="filter" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-64" name="ValidFilter-5" desc="Validate Filter Value">
		<input value="0073796001506" 
		filter="5" serial="1" companyprefixlength="7" outputlevel="BINARY"/>
		<output value="0000100110100000010011110000000000000100101100000000000000000001"/>
		<test-parameter name="filter" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-64" name="ValidFilter-6" desc="Validate Filter Value">
		<input value="0073796001506" 
		filter="6" serial="1" companyprefixlength="7" outputlevel="BINARY"/>
		<output value="0000100111000000010011110000000000000100101100000000000000000001"/>
		<test-parameter name="filter" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-64" name="ValidFilter-7" desc="Validate Filter Value">
		<input value="0073796001506" 
		filter="7" serial="1" companyprefixlength="7" outputlevel="BINARY"/>
		<output value="0000100111100000010011110000000000000100101100000000000000000001"/>
		<test-parameter name="filter" status="PASSED" errorMsg=""/>
	</testcase>

	<!-- Test CompanyPrefix Length -->
	<testcase type="SGLN-64" name="ValidCompanyPrefix-6" desc="Validate CompanyPrefix">
		<input value="0380040001506" 
		filter="0" serial="1" companyprefixlength="6" outputlevel="BINARY"/>
		<output value="0000100100000000000000100000000000000100101100000000000000000001"/>
		<test-parameter name="companyprefix" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-64" name="ValidCompanyPrefix-8" desc="Validate CompanyPrefix length">
		<input value="0841058000000" 
		filter="3" serial="1" companyprefixlength="8" outputlevel="BINARY"/>
		<output value="0000100100100000001010101000000000000000000000000000000000000001"/>
		<test-parameter name="companyprefix" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-64" name="ValidCompanyPrefix-9" desc="Validate CompanyPrefix length">
		<input value="0835924000007" 
		filter="3" serial="1" companyprefixlength="9" outputlevel="BINARY"/>
		<output value="0000100100100000100110010000000000000000000000000000000000000001"/>
		<test-parameter name="companyprefix" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-64" name="ValidCompanyPrefix-10" desc="Validate CompanyPrefix length">
		<input value="0850583001004" 
		filter="3" serial="1" companyprefixlength="10" outputlevel="BINARY"/>
		<output value="0000100100100000100001101000000000000000000000000000000000000001"/>
		<test-parameter name="companyprefix" status="PASSED" errorMsg=""/>
	</testcase>

	<!-- Test Location Ref -->
	<testcase type="SGLN-64" name="ValidMinLocationRef-6" desc="Validate Min Location Reference">
		<input value="0380040000000" 
		filter="0" serial="1" companyprefixlength="6" outputlevel="BINARY"/>
		<output value="0000100100100000000000100000000000000000000000000000000000000001"/>
		<test-parameter name="minlocationref" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-64" name="ValidMaxLocationRef-6" desc="Validate Min Location Reference">
		<input value="0380049999993" 
		filter="0" serial="1" companyprefixlength="6" outputlevel="BINARY"/>
		<output value="0000100100000000000000100111101000010001111110000000000000000001"/>
		<test-parameter name="maxlocationref" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-64" name="ValidMinLocationRef-7" desc="Validate Location Reference">
		<input value="0073796000000" 
		filter="0" serial="1" companyprefixlength="7" outputlevel="BINARY"/>
		<output value="0000100100000000010011110000000000000000000000000000000000000001"/>
		<test-parameter name="minlocationref" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-64" name="ValidMaxLocationRef-7" desc="Validate Location Reference">
		<input value="0073796999995" 
		filter="0" serial="1" companyprefixlength="7" outputlevel="BINARY"/>
		<output value="0000100100000000010011110000110000110100111110000000000000000001"/>
		<test-parameter name="maxlocationref" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-64" name="ValidMinLocationRef-8" desc="Validate Location Reference">
		<input value="0841058000000" 
		filter="0" serial="1" companyprefixlength="8" outputlevel="BINARY"/>
		<output value="0000100100100000001010101000000000000000000000000000000000000001"/>
		<test-parameter name="minlocationref" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-64" name="ValidMaxLocationRef-8" desc="Validate Location Reference">
		<input value="0841058099998" 
		filter="0" serial="1" companyprefixlength="8" outputlevel="BINARY"/>
		<output value="0000100100100000001010101000000100111000011110000000000000000001"/>
		<test-parameter name="maxlocationref" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-64" name="ValidMinLocationRef-9" desc="Validate Location Reference">
		<input value="0835924000007" 
		filter="0" serial="1" companyprefixlength="9" outputlevel="BINARY"/>
		<output value="0000100100100000100110010000000000000000000000000000000000000001"/>
		<test-parameter name="minlocationref" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-64" name="ValidMaxLocationRef-9" desc="Validate Location Reference">
		<input value="0835924009992" 
		filter="0" serial="1" companyprefixlength="9" outputlevel="BINARY"/>
		<output value="0000100100100000100110010000000000011111001110000000000000000001"/>
		<test-parameter name="maxlocationref" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-64" name="ValidMinLocationRef-10" desc="Validate Location Reference">
		<input value="0850583001004" 
		filter="0" serial="1" companyprefixlength="10" outputlevel="BINARY"/>
		<output value="0000100100100000100001101000000000000000000000000000000000000001"/>
		<test-parameter name="minlocationref" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-64" name="ValidMaxLocationRef-10" desc="Validate Location Reference">
		<input value="0850583001998" 
		filter="0" serial="1" companyprefixlength="10" outputlevel="BINARY"/>
		<output value="0000100100100000100001101000000000000011000110000000000000000001"/>
		<test-parameter name="maxlocationref" status="PASSED" errorMsg=""/>
	</testcase>
	
	<!-- Test Serial Number -->
	<testcase type="SGLN-64" name="ValidMinSerial" desc="Validate minimum serial number value allowed">
		<input value="0073796001506" 
		filter="0" serial="0" companyprefixlength="7" outputlevel="BINARY"/>
		<output value="0000100100100000010011110000000000000100101100000000000000000000"/>
		<test-parameter name="serial" status="PASSED" errorMsg=""/>
	</testcase>
	<testcase type="SGLN-64" name="ValidMaxSerial" desc="Validate maximum serial number value allowed">
		<input value="0073796001506" 
		filter="0" serial="524287" companyprefixlength="7" outputlevel="BINARY"/>
		<output value="0000100100000000000000000000000000000100101101111111111111111111"/>
		<test-parameter name="serial" status="PASSED" errorMsg=""/>
	</testcase>
		
	<!-- Invalid Test Scenarios -->
	<testcase type="SGLN-64" name="InvalidSchemeType" desc="Validate if the header corresponds to a defined coding scheme"">
		<input value="1111111100000000010011110000000000000100101101111111111111111111" 
		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-64" name="InvalidCompanyPrefixIndex" 
			  desc="Validate company prefix">
		<input value="1001100000000000000001111010100011110100000000000000000000000000" 
		filter="" outputlevel="LEGACY"/>
		<output value="" />
		<test-parameter name="companyprefixValue" 
		status="FAILED" errorMsg="Company Prefix "/>
	</testcase>
	<testcase type="SGLN-64" 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-64" 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-64" 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-64" 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-64" 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-64" 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>