Commit 4246de7e authored by Andreas Liebig's avatar Andreas Liebig
Browse files

Add test case for Circle

parent 53972e05
Loading
Loading
Loading
Loading
+85 −5
Original line number Diff line number Diff line
/* ETSI Software License
* As long as the hereunder conditions are respected, non-exclusive permission is hereby granted,
* free of charge, to use, reproduce and modify this software source code, under the following conditions:
* This source code is provided �AS IS� with no warranties, express or implied, including but not limited to,
* This source code is provided ���AS IS��� with no warranties, express or implied, including but not limited to,
* the warranties of merchantability, fitness for a particular purpose and warranties for non-infringement
* of intellectual property rights.
* ETSI shall not be held liable in any event for any direct or indirect damages whatsoever (including, without
@@ -38,7 +38,9 @@ Package NG112_LIS {
        }

//			Const {
//				POS1: "-34.407 150.88001";
//				POINT_POS: "-34.400 134.4000";
//				CIRCLE_POS: "-35.500 135.5000";
//				CIRCLE_RADIUS: "15";
//			}
        
//		Data {
@@ -62,7 +64,7 @@ Package NG112_LIS {
            TP Id TP_LIS_HTTP_POST_BV_01
                
            Test objective 
                 "IUT successfully processes all mandatory HTTP headers when it receives a HTTP POST request" 
                 "IUT successfully responds with a Point when it receives a HTTP POST location request without location type" 
            Reference 
                "ETSI TS 103 479 Vm.t.e (yyyy-mm) Clause 5.5 Location Information Server (LIS)",
                "Next Generation 112 Long Term Definition http://www.eena.org/uploads/gallery/files/pdf/2013-03-15-eena_ng_longtermdefinitionupdated.pdf Clause 4.10",
@@ -73,7 +75,9 @@ Package NG112_LIS {
            PICS Selection PICS_HTTP_POST_REQUEST PICS_LOCATION_HELD
            Initial conditions with {
                the IUT entity havingLocationMappingFor the "deviceNumber" containing
                	"point" indicating value POS1
                	"point" containing 
                		"position" indicating value POINT_POS
                	;
                ;
            }
            Expected behaviour
@@ -114,7 +118,83 @@ Package NG112_LIS {
																		element "location-info" containing
																			element "Point" inNamespace "http://www.opengis.net/gml" containing
																				attribute "srsName" indicating value "urn:ogc:def:crs:EPSG::4326",
																				element "pos" indicating value POS1
																				element "pos" indicating value POINT_POS
																				;
																			;
																		;
																	;
																;
															;	
                    	 			;
                    	 		; 	
                    	 	;	
                      ;
              	}
        	}
    	}
    	
    	Test Purpose {
            TP Id TP_LIS_HTTP_POST_BV_02
                
            Test objective 
                 "IUT successfully responds with a Circle when it receives a HTTP POST location request without location type" 
            Reference 
                "ETSI TS 103 479 Vm.t.e (yyyy-mm) Clause 5.5 Location Information Server (LIS)",
                "Next Generation 112 Long Term Definition http://www.eena.org/uploads/gallery/files/pdf/2013-03-15-eena_ng_longtermdefinitionupdated.pdf Clause 4.10",
                "https://tools.ietf.org/html/rfc5985"

						//Config Id CFG_LIS_01

            PICS Selection PICS_HTTP_POST_REQUEST PICS_LOCATION_HELD
            Initial conditions with {
                the IUT entity havingLocationMappingFor the "deviceNumber" containing
                	"circle" containing
                		"position" indicating value CIRCLE_POS,
                		"radius"	indicating value CIRCLE_RADIUS
                	;
                ;
            }
            Expected behaviour
            ensure that {
            	when {
                	the IUT entity receives a POST containing
                  	Uri indicating value "/location",
										Host,
                    not Accept,
                    Content_type indicating value "application/held+xml;charset=utf-8",
                    body containing
                    	xmlMessage containing
                    		version indicating value "1.0",
                       	element "locationRequest" inNamespace "urn:ietf:params:xml:ns:geopriv:held" containing
                        	element "device" inNamespace "urn:ietf:params:xml:ns:geopriv:held:id" containing
                        		element "uri" inNamespace "urn:ietf:params:xml:ns:geopriv:held:id" indicating value "deviceNumber"
                    			;
												;
                  		;
                		;	       
	              	;                 			
                }
                then {
                    the IUT entity sends a httpResponse containing
                    	Status_Code indicating value "200 OK",
                    	version indicating value "1.0",
                    	Content_type indicating value "application/held+xml;charset=utf-8",
                    	body containing
                     		xmlMessage containing	
              						version indicating value "1.0",
                    	 		element "locationResponse" inNamespace "urn:ietf:params:xml:ns:geopriv:held" containing
                    	 			element "presence" inNamespace "urn:ietf:params:xml:ns:pidf" containing
															attribute "entity" indicating value valid "pres:" uri,
															element "tuple" containing
																attribute "id",
																element "status" containing
																	element "geopriv" inNamespace "urn:ietf:params:xml:ns:pidf:geopriv10" containing
																		element "location-info" containing
																			element "Circle" inNamespace "http://www.opengis.net/pidflo/1.0" containing
																				attribute "srsName" indicating value "urn:ogc:def:crs:EPSG::4326",
																				element "pos" inNamespace "http://www.opengis.net/gml" indicating value CIRCLE_POS,
																				element "radius" indicating value CIRCLE_RADIUS containing
																					attribute "uom" indicating value "urn:ogc:def:uom:EPSG::9001";
																				;
																			;
																		;