Specifications:
Verify status S0015 current traffic situation
-
Given the site is connected
-
Request status
-
Expect status response before timeout
11 12 13 14 15 16 17 18
# File 'spec/site/tlc/traffic_situations_spec.rb', line 11 Validator::Site.connected do |task,supervisor,site| if RSMP::Proxy.version_meets_requirement?( site.sxl_version, '>=1.1' ) status_list = { S0015: [:status,:source] } else status_list = { S0015: [:status] } end request_status_and_confirm site, "current traffic situation", status_list end
-
Verify that we change traffic situation
-
Given the site is connected
-
Verify that there is a Validator.get_config(‘validator’) with a traffic situation
-
Send the control command to switch traffic situation for each traffic situation
-
Wait for status “Current traffic situation” = requested traffic situation
28 29 30 31 32 33 34 35
# File 'spec/site/tlc/traffic_situations_spec.rb', line 28 situations = Validator.get_config('items','traffic_situations') skip("No traffic situations configured") if situations.nil? || situations.empty? Validator::Site.connected do |task,supervisor,site| prepare task, site situations.each { |traffic_situation| switch_traffic_situation traffic_situation.to_s } ensure unset_traffic_situation end
-
Verify status S0019 number of traffic situations
-
Given the site is connected
-
Request status
-
Expect status response before timeout
44 45 46 47
# File 'spec/site/tlc/traffic_situations_spec.rb', line 44 Validator::Site.connected do |task,supervisor,site| request_status_and_confirm site, "number of traffic situations", { S0019: [:number] } end
-