earth 0.3.9 → 0.3.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. data/Gemfile +5 -0
  2. data/Gemfile.lock +58 -20
  3. data/features/automobile_fuel_type.feature +44 -0
  4. data/features/automobile_make.feature +24 -0
  5. data/features/automobile_make_fleet_year.feature +44 -0
  6. data/features/automobile_make_model.feature +24 -0
  7. data/features/automobile_make_model_year.feature +34 -0
  8. data/features/automobile_make_model_year_variant.feature +46 -0
  9. data/features/automobile_make_year.feature +44 -0
  10. data/features/automobile_size_class.feature +59 -0
  11. data/features/bus_class.feature +69 -0
  12. data/features/carrier.feature +64 -0
  13. data/features/carrier_mode.feature +74 -0
  14. data/features/egrid_region.feature +14 -0
  15. data/features/egrid_subregion.feature +36 -0
  16. data/features/rail_class.feature +64 -0
  17. data/features/shipment_mode.feature +34 -0
  18. data/features/support/env.rb +7 -0
  19. data/features/support/imports/automobile_fuel_type_bad.csv +3 -0
  20. data/features/support/imports/automobile_fuel_type_good.csv +3 -0
  21. data/features/support/imports/automobile_make_bad.csv +3 -0
  22. data/features/support/imports/automobile_make_fleet_year_bad.csv +3 -0
  23. data/features/support/imports/automobile_make_fleet_year_good.csv +3 -0
  24. data/features/support/imports/automobile_make_good.csv +3 -0
  25. data/features/support/imports/automobile_make_model_bad.csv +3 -0
  26. data/features/support/imports/automobile_make_model_good.csv +3 -0
  27. data/features/support/imports/automobile_make_model_year_bad.csv +3 -0
  28. data/features/support/imports/automobile_make_model_year_good.csv +3 -0
  29. data/features/support/imports/automobile_make_model_year_variant_bad.csv +3 -0
  30. data/features/support/imports/automobile_make_model_year_variant_good.csv +3 -0
  31. data/features/support/imports/automobile_make_year_bad.csv +3 -0
  32. data/features/support/imports/automobile_make_year_good.csv +3 -0
  33. data/features/support/imports/automobile_size_class_bad.csv +3 -0
  34. data/features/support/imports/automobile_size_class_good.csv +3 -0
  35. data/features/support/imports/bus_class_bad.csv +3 -0
  36. data/features/support/imports/bus_class_good.csv +3 -0
  37. data/features/support/imports/carrier_bad.csv +3 -0
  38. data/features/support/imports/carrier_good.csv +3 -0
  39. data/features/support/imports/carrier_mode_bad.csv +3 -0
  40. data/features/support/imports/carrier_mode_good.csv +3 -0
  41. data/features/support/imports/egrid_region_bad.csv +3 -0
  42. data/features/support/imports/egrid_region_good.csv +3 -0
  43. data/features/support/imports/egrid_subregion_bad.csv +3 -0
  44. data/features/support/imports/egrid_subregion_good.csv +3 -0
  45. data/features/support/imports/rail_class_bad.csv +3 -0
  46. data/features/support/imports/rail_class_good.csv +3 -0
  47. data/features/support/imports/shipment_mode_bad.csv +3 -0
  48. data/features/support/imports/shipment_mode_good.csv +3 -0
  49. data/lib/earth/automobile/automobile_fuel_type/data_miner.rb +35 -14
  50. data/lib/earth/automobile/automobile_make/data_miner.rb +24 -9
  51. data/lib/earth/automobile/automobile_make_fleet_year/data_miner.rb +32 -1
  52. data/lib/earth/automobile/automobile_make_model/data_miner.rb +27 -5
  53. data/lib/earth/automobile/automobile_make_model_year/data_miner.rb +35 -5
  54. data/lib/earth/automobile/automobile_make_model_year_variant/data_miner.rb +80 -39
  55. data/lib/earth/automobile/automobile_make_year/data_miner.rb +32 -1
  56. data/lib/earth/automobile/automobile_size_class/data_miner.rb +67 -4
  57. data/lib/earth/bus/bus_class/data_miner.rb +73 -0
  58. data/lib/earth/locality/egrid_region/data_miner.rb +8 -0
  59. data/lib/earth/locality/egrid_subregion/data_miner.rb +26 -0
  60. data/lib/earth/rail/rail_class/data_miner.rb +51 -0
  61. data/lib/earth/shipping/carrier/data_miner.rb +47 -8
  62. data/lib/earth/shipping/carrier_mode/data_miner.rb +57 -8
  63. data/lib/earth/shipping/shipment_mode/data_miner.rb +23 -4
  64. metadata +110 -98
data/Gemfile CHANGED
@@ -1,5 +1,10 @@
1
1
  gem 'data_miner', :path => ENV['LOCAL_DATA_MINER'] if ENV['LOCAL_DATA_MINER']
2
+ gem 'sniff', :path => ENV['LOCAL_SNIFF'] if ENV['LOCAL_SNIFF']
2
3
 
3
4
  source :rubygems
4
5
 
5
6
  gemspec :path => '.'
7
+
8
+ if RUBY_VERSION =~ /^1\.8/
9
+ gem 'fastercsv'
10
+ end
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- earth (0.3.8)
4
+ earth (0.3.9)
5
5
  activerecord (~> 3)
6
6
  cohort_scope (>= 0.0.7)
7
7
  conversions (>= 1.4.5)
@@ -17,6 +17,7 @@ GEM
17
17
  GData (0.0.4)
18
18
  builder (>= 2.1.2)
19
19
  hoe (>= 1.2.1)
20
+ aaronh-chronic (0.3.9)
20
21
  activemodel (3.0.3)
21
22
  activesupport (= 3.0.3)
22
23
  builder (~> 2.1.2)
@@ -35,8 +36,16 @@ GEM
35
36
  cohort_scope (0.1.1)
36
37
  activerecord (>= 3.0.0.beta4)
37
38
  activesupport (>= 3.0.0.beta4)
39
+ common_name (0.1.5)
40
+ activesupport (>= 2.3.4)
38
41
  conversions (1.4.5)
39
42
  activesupport (>= 2.3.4)
43
+ cucumber (0.9.4)
44
+ builder (~> 2.1.2)
45
+ diff-lcs (~> 1.1.2)
46
+ gherkin (~> 2.2.9)
47
+ json (~> 1.4.6)
48
+ term-ansicolor (~> 1.0.5)
40
49
  data_miner (0.5.7)
41
50
  activerecord (>= 2.3.4)
42
51
  activesupport (>= 2.3.4)
@@ -55,16 +64,22 @@ GEM
55
64
  escape (0.0.4)
56
65
  falls_back_on (0.0.3)
57
66
  activerecord
67
+ fast_timestamp (0.0.4)
68
+ gemcutter (0.6.1)
58
69
  geokit (1.5.0)
70
+ gherkin (2.2.9)
71
+ json (~> 1.4.6)
72
+ term-ansicolor (~> 1.0.5)
59
73
  git (1.2.5)
60
74
  hoe (2.8.0)
61
75
  rake (>= 0.8.7)
62
76
  hpricot (0.8.3)
63
77
  i18n (0.5.0)
64
- jeweler (1.5.1)
65
- bundler (~> 1.0.0)
78
+ jeweler (1.4.0)
79
+ gemcutter (>= 0.1.0)
66
80
  git (>= 1.2.5)
67
- rake
81
+ rubyforge (>= 2.0.0)
82
+ json (1.4.6)
68
83
  json_pure (1.4.6)
69
84
  libxml-ruby (1.1.4)
70
85
  log4r (1.1.9)
@@ -73,11 +88,13 @@ GEM
73
88
  amatch (>= 0.2.5)
74
89
  andand (>= 1.3.1)
75
90
  mime-types (1.16)
91
+ mustache (0.12.0)
76
92
  nokogiri (1.4.4)
77
93
  rack (1.2.1)
78
94
  rake (0.8.7)
79
95
  rcov (0.9.9)
80
- rdoc (2.5.11)
96
+ rdiscount (1.6.5)
97
+ rdoc (3.2)
81
98
  remote_table (0.2.32)
82
99
  activesupport (>= 2.3.4)
83
100
  escape (>= 0.0.4)
@@ -86,27 +103,50 @@ GEM
86
103
  slither (>= 0.99.4)
87
104
  rest-client (1.6.1)
88
105
  mime-types (>= 1.16)
106
+ rocco (0.5)
107
+ mustache
108
+ rdiscount
89
109
  roo (1.3.11)
90
110
  GData (>= 0.0.4)
91
111
  hpricot (>= 0.6)
92
112
  libxml-ruby (>= 1.1.3)
93
113
  rubyzip (>= 0.9.1)
94
114
  spreadsheet (>= 0.6.4)
95
- rspec (2.2.0)
96
- rspec-core (~> 2.2)
97
- rspec-expectations (~> 2.2)
98
- rspec-mocks (~> 2.2)
99
- rspec-core (2.2.1)
100
- rspec-expectations (2.2.0)
101
- diff-lcs (~> 1.1.2)
102
- rspec-mocks (2.2.0)
115
+ rspec (2.0.1)
116
+ rspec-core (~> 2.0.1)
117
+ rspec-expectations (~> 2.0.1)
118
+ rspec-mocks (~> 2.0.1)
119
+ rspec-core (2.0.1)
120
+ rspec-expectations (2.0.1)
121
+ diff-lcs (>= 1.1.2)
122
+ rspec-mocks (2.0.1)
123
+ rspec-core (~> 2.0.1)
124
+ rspec-expectations (~> 2.0.1)
103
125
  ruby-ole (1.2.11.1)
126
+ rubyforge (2.0.4)
127
+ json_pure (>= 1.1.7)
104
128
  rubyzip (0.9.4)
105
129
  sequel (3.17.0)
106
130
  sinatra (1.0)
107
131
  rack (>= 1.0)
108
132
  slither (0.99.4)
109
- spreadsheet (0.6.4.1)
133
+ sniff (0.4.11)
134
+ aaronh-chronic (~> 0.3.9)
135
+ activerecord (~> 3.0.0)
136
+ activesupport (~> 3.0.0)
137
+ common_name (~> 0.1.5)
138
+ cucumber (~> 0.9.4)
139
+ earth (~> 0.3.1)
140
+ fast_timestamp (~> 0.0.4)
141
+ jeweler (~> 1.4.0)
142
+ rake
143
+ rcov
144
+ rdoc
145
+ rocco
146
+ rspec (~> 2.0.0)
147
+ sqlite3-ruby (~> 1.3.0)
148
+ timeframe (~> 0.0.8)
149
+ spreadsheet (0.6.5.0)
110
150
  ruby-ole
111
151
  sqlite3-ruby (1.3.2)
112
152
  taps (0.3.14)
@@ -116,6 +156,9 @@ GEM
116
156
  sequel (~> 3.17.0)
117
157
  sinatra (~> 1.0.0)
118
158
  sqlite3-ruby (~> 1.2)
159
+ term-ansicolor (1.0.5)
160
+ timeframe (0.0.8)
161
+ activesupport (>= 2.3.5)
119
162
  tzinfo (0.3.23)
120
163
  weighted_average (0.0.6)
121
164
  activerecord (~> 3)
@@ -132,11 +175,6 @@ DEPENDENCIES
132
175
  earth!
133
176
  falls_back_on (>= 0.0.3)
134
177
  geokit (>= 1.5.0)
135
- jeweler (~> 1.4)
136
178
  loose_tight_dictionary (>= 0.0.8)
137
- rake
138
- rcov
139
- rdoc
140
- rspec (~> 2)
141
- sqlite3-ruby
179
+ sniff (~> 0.4.9)
142
180
  weighted_average (>= 0.0.4)
@@ -0,0 +1,44 @@
1
+ Feature: Data import for AutomobileFuelType
2
+ As a data user
3
+ I want to import AutomobileFuelType data
4
+ So that I can perform fuel type-based calculations
5
+
6
+ Scenario: Successfully verifying that annual distance > 0
7
+ Given a "AutomobileFuelType" data import fetches results listed in "automobile_fuel_type_good"
8
+ When a data import verifies "Annual distance should be greater than zero"
9
+ Then the verification should be successful
10
+
11
+ Scenario: Successfully verifying that annual distance units are never missing
12
+ Given a "AutomobileFuelType" data import fetches results listed in "automobile_fuel_type_good"
13
+ When a data import verifies "Annual distance units should never be missing"
14
+ Then the verification should be successful
15
+
16
+ Scenario: Successfully verifying that emission factor >= 0
17
+ Given a "AutomobileFuelType" data import fetches results listed in "automobile_fuel_type_good"
18
+ When a data import verifies "Emission factor should be zero or more"
19
+ Then the verification should be successful
20
+
21
+ Scenario: Successfully verifying that emission factor units are never missing
22
+ Given a "AutomobileFuelType" data import fetches results listed in "automobile_fuel_type_good"
23
+ When a data import verifies "Emission factor units should never be missing"
24
+ Then the verification should be successful
25
+
26
+ Scenario: Failing to verify that annual distance > 0
27
+ Given a "AutomobileFuelType" data import fetches results listed in "automobile_fuel_type_bad"
28
+ When a data import verifies "Annual distance should be greater than zero"
29
+ Then the verification should not be successful
30
+
31
+ Scenario: Failing to verify that annual distance units are never missing
32
+ Given a "AutomobileFuelType" data import fetches results listed in "automobile_fuel_type_bad"
33
+ When a data import verifies "Annual distance units should never be missing"
34
+ Then the verification should not be successful
35
+
36
+ Scenario: Failing to verify that emission factor >= 0
37
+ Given a "AutomobileFuelType" data import fetches results listed in "automobile_fuel_type_bad"
38
+ When a data import verifies "Emission factor should be zero or more"
39
+ Then the verification should not be successful
40
+
41
+ Scenario: Failing to verify that emission factor units are never missing
42
+ Given a "AutomobileFuelType" data import fetches results listed in "automobile_fuel_type_bad"
43
+ When a data import verifies "Emission factor units should never be missing"
44
+ Then the verification should not be successful
@@ -0,0 +1,24 @@
1
+ Feature: Data import for AutomobileMake
2
+ As a data user
3
+ I want to import Make data
4
+ So that I can perform make-based calculations
5
+
6
+ Scenario: Successfully verifying that fuel efficiency is greater than zero
7
+ Given a "AutomobileMake" data import fetches results listed in "automobile_make_good"
8
+ When a data import verifies "Fuel efficiency should be greater than zero"
9
+ Then the verification should be successful
10
+
11
+ Scenario: Successfully verifying that fuel efficiency units are kilometres per litre
12
+ Given a "AutomobileMake" data import fetches results listed in "automobile_make_good"
13
+ When a data import verifies "Fuel efficiency units should be kilometres per litre"
14
+ Then the verification should be successful
15
+
16
+ Scenario: Failing to verify that fuel efficiency is greater than zero
17
+ Given a "AutomobileMake" data import fetches results listed in "automobile_make_bad"
18
+ When a data import verifies "Fuel efficiency should be greater than zero"
19
+ Then the verification should not be successful
20
+
21
+ Scenario: Failing to verify that fuel efficiency units are kilometres per litre
22
+ Given a "AutomobileMake" data import fetches results listed in "automobile_make_bad"
23
+ When a data import verifies "Fuel efficiency units should be kilometres per litre"
24
+ Then the verification should not be successful
@@ -0,0 +1,44 @@
1
+ Feature: Data import for AutomobileMakeFleetYear
2
+ As a data user
3
+ I want to import MakeFleetYear data
4
+ So that I can perform year-based calculations
5
+
6
+ Scenario: Successfully verifying that year is between 1978 and 2007
7
+ Given a "AutomobileMakeFleetYear" data import fetches results listed in "automobile_make_fleet_year_good"
8
+ When a data import verifies "Year should be between 1978 and 2007"
9
+ Then the verification should be successful
10
+
11
+ Scenario: Successfully verifying that fuel efficiency is greater than zero
12
+ Given a "AutomobileMakeFleetYear" data import fetches results listed in "automobile_make_fleet_year_good"
13
+ When a data import verifies "Fuel efficiency should be greater than zero"
14
+ Then the verification should be successful
15
+
16
+ Scenario: Successfully verifying that volume is greater than zero
17
+ Given a "AutomobileMakeFleetYear" data import fetches results listed in "automobile_make_fleet_year_good"
18
+ When a data import verifies "Volume should be greater than zero"
19
+ Then the verification should be successful
20
+
21
+ Scenario: Successfully verifying that fuel efficiency units are kilometres per litre
22
+ Given a "AutomobileMakeFleetYear" data import fetches results listed in "automobile_make_fleet_year_good"
23
+ When a data import verifies "Fuel efficiency units should be kilometres per litre"
24
+ Then the verification should be successful
25
+
26
+ Scenario: Failing to verify that year is between 1978 and 2007
27
+ Given a "AutomobileMakeFleetYear" data import fetches results listed in "automobile_make_fleet_year_bad"
28
+ When a data import verifies "Year should be between 1978 and 2007"
29
+ Then the verification should not be successful
30
+
31
+ Scenario: Failing to verify that fuel efficiency is greater than zero
32
+ Given a "AutomobileMakeFleetYear" data import fetches results listed in "automobile_make_fleet_year_bad"
33
+ When a data import verifies "Fuel efficiency should be greater than zero"
34
+ Then the verification should not be successful
35
+
36
+ Scenario: Failing to verify that volume is greater than zero
37
+ Given a "AutomobileMakeFleetYear" data import fetches results listed in "automobile_make_fleet_year_bad"
38
+ When a data import verifies "Volume should be greater than zero"
39
+ Then the verification should not be successful
40
+
41
+ Scenario: Failing to verify that fuel efficiency units are kilometres per litre
42
+ Given a "AutomobileMakeFleetYear" data import fetches results listed in "automobile_make_fleet_year_bad"
43
+ When a data import verifies "Fuel efficiency units should be kilometres per litre"
44
+ Then the verification should not be successful
@@ -0,0 +1,24 @@
1
+ Feature: Data import for AutomobileMakeModel
2
+ As a data user
3
+ I want to import MakeModel data
4
+ So that I can perform model-based calculations
5
+
6
+ Scenario: Successfully verifying that fuel efficiences are greater than zero
7
+ Given a "AutomobileMakeModel" data import fetches results listed in "automobile_make_model_good"
8
+ When a data import verifies "Fuel efficiencies should be greater than zero"
9
+ Then the verification should be successful
10
+
11
+ Scenario: Successfully verifying that fuel efficiency units are kilometres per litre
12
+ Given a "AutomobileMakeModel" data import fetches results listed in "automobile_make_model_good"
13
+ When a data import verifies "Fuel efficiency units should be kilometres per litre"
14
+ Then the verification should be successful
15
+
16
+ Scenario: Failing to verify that fuel efficiences are greater than zero
17
+ Given a "AutomobileMakeModel" data import fetches results listed in "automobile_make_model_bad"
18
+ When a data import verifies "Fuel efficiencies should be greater than zero"
19
+ Then the verification should not be successful
20
+
21
+ Scenario: Failing to verify that fuel efficiency units are kilometres per litre
22
+ Given a "AutomobileMakeModel" data import fetches results listed in "automobile_make_model_bad"
23
+ When a data import verifies "Fuel efficiency units should be kilometres per litre"
24
+ Then the verification should not be successful
@@ -0,0 +1,34 @@
1
+ Feature: Data import for AutomobileMakeModelYear
2
+ As a data user
3
+ I want to import MakeModelYear data
4
+ So that I can perform model year-based calculations
5
+
6
+ Scenario: Successfully verifying that year is between 1985 and 2009
7
+ Given a "AutomobileMakeModelYear" data import fetches results listed in "automobile_make_model_year_good"
8
+ When a data import verifies "Year should be between 1985 and 2009"
9
+ Then the verification should be successful
10
+
11
+ Scenario: Successfully verifying that fuel efficiences are greater than zero
12
+ Given a "AutomobileMakeModelYear" data import fetches results listed in "automobile_make_model_year_good"
13
+ When a data import verifies "Fuel efficiencies should be greater than zero"
14
+ Then the verification should be successful
15
+
16
+ Scenario: Successfully verifying that fuel efficiency units are kilometres per litre
17
+ Given a "AutomobileMakeModelYear" data import fetches results listed in "automobile_make_model_year_good"
18
+ When a data import verifies "Fuel efficiency units should be kilometres per litre"
19
+ Then the verification should be successful
20
+
21
+ Scenario: Failing to verify that year is between 1985 and 2009
22
+ Given a "AutomobileMakeModelYear" data import fetches results listed in "automobile_make_model_year_bad"
23
+ When a data import verifies "Year should be between 1985 and 2009"
24
+ Then the verification should not be successful
25
+
26
+ Scenario: Failing to verify that fuel efficiences are greater than zero
27
+ Given a "AutomobileMakeModelYear" data import fetches results listed in "automobile_make_model_year_bad"
28
+ When a data import verifies "Fuel efficiencies should be greater than zero"
29
+ Then the verification should not be successful
30
+
31
+ Scenario: Failing to verify that fuel efficiency units are kilometres per litre
32
+ Given a "AutomobileMakeModelYear" data import fetches results listed in "automobile_make_model_year_bad"
33
+ When a data import verifies "Fuel efficiency units should be kilometres per litre"
34
+ Then the verification should not be successful
@@ -0,0 +1,46 @@
1
+ Feature: Data import for AutomobileMakeModelYearVariant
2
+ As a data user
3
+ I want to import MakeModelYearVariant data
4
+ So that I can perform variant-based calculations
5
+
6
+ Scenario: Successfully verifying that year is between 1985 and 2009
7
+ Given a "AutomobileMakeModelYearVariant" data import fetches results listed in "automobile_make_model_year_variant_good"
8
+ When a data import verifies "Year should be between 1985 and 2009"
9
+ Then the verification should be successful
10
+
11
+ # FIXME TODO
12
+ # Scenario: Successfully verifying that fuel type code is found in AutomobileFuelType
13
+ # Given a "AutomobileMakeModelYearVariant" data import fetches results listed in "automobile_make_model_year_variant_good"
14
+ # When a data import verifies "Fuel type code should be found in AutomobileFuelType"
15
+ # Then the verification should be successful
16
+
17
+ Scenario: Successfully verifying that fuel efficiencies are greater than zero
18
+ Given a "AutomobileMakeModelYearVariant" data import fetches results listed in "automobile_make_model_year_variant_good"
19
+ When a data import verifies "Fuel efficiencies should be greater than zero"
20
+ Then the verification should be successful
21
+
22
+ Scenario: Successfully verifying that fuel efficiency units are kilometres per litre
23
+ Given a "AutomobileMakeModelYearVariant" data import fetches results listed in "automobile_make_model_year_variant_good"
24
+ When a data import verifies "Fuel efficiency units should be kilometres per litre"
25
+ Then the verification should be successful
26
+
27
+ Scenario: Failing to verify that year is between 1985 and 2009
28
+ Given a "AutomobileMakeModelYearVariant" data import fetches results listed in "automobile_make_model_year_variant_bad"
29
+ When a data import verifies "Year should be between 1985 and 2009"
30
+ Then the verification should not be successful
31
+
32
+ # FIXME TODO
33
+ # Scenario: Failing to verify that fuel type code is found in AutomobileFuelType
34
+ # Given a "AutomobileMakeModelYearVariant" data import fetches results listed in "automobile_make_model_year_variant_bad"
35
+ # When a data import verifies "Fuel type code should be found in AutomobileFuelType"
36
+ # Then the verification should not be successful
37
+
38
+ Scenario: Failing to verify that fuel efficiencies are greater than zero
39
+ Given a "AutomobileMakeModelYearVariant" data import fetches results listed in "automobile_make_model_year_variant_bad"
40
+ When a data import verifies "Fuel efficiencies should be greater than zero"
41
+ Then the verification should not be successful
42
+
43
+ Scenario: Failing to verify that fuel efficiency units are kilometres per litre
44
+ Given a "AutomobileMakeModelYearVariant" data import fetches results listed in "automobile_make_model_year_variant_bad"
45
+ When a data import verifies "Fuel efficiency units should be kilometres per litre"
46
+ Then the verification should not be successful
@@ -0,0 +1,44 @@
1
+ Feature: Data import for AutomobileMakeYear
2
+ As a data user
3
+ I want to import MakeYear data
4
+ So that I can perform year-based calculations
5
+
6
+ Scenario: Successfully verifying that year is between 1978 and 2007
7
+ Given a "AutomobileMakeYear" data import fetches results listed in "automobile_make_year_good"
8
+ When a data import verifies "Year should be between 1978 and 2007"
9
+ Then the verification should be successful
10
+
11
+ Scenario: Successfully verifying that fuel efficiency is greater than zero
12
+ Given a "AutomobileMakeYear" data import fetches results listed in "automobile_make_year_good"
13
+ When a data import verifies "Fuel efficiency should be greater than zero"
14
+ Then the verification should be successful
15
+
16
+ Scenario: Successfully verifying that volume is greater than zero
17
+ Given a "AutomobileMakeYear" data import fetches results listed in "automobile_make_year_good"
18
+ When a data import verifies "Volume should be greater than zero"
19
+ Then the verification should be successful
20
+
21
+ Scenario: Successfully verifying that fuel efficiency units are kilometres per litre
22
+ Given a "AutomobileMakeYear" data import fetches results listed in "automobile_make_year_good"
23
+ When a data import verifies "Fuel efficiency units should be kilometres per litre"
24
+ Then the verification should be successful
25
+
26
+ Scenario: Failing to verify that year is between 1978 and 2007
27
+ Given a "AutomobileMakeYear" data import fetches results listed in "automobile_make_year_bad"
28
+ When a data import verifies "Year should be between 1978 and 2007"
29
+ Then the verification should not be successful
30
+
31
+ Scenario: Failing to verify that fuel efficiency is greater than zero
32
+ Given a "AutomobileMakeYear" data import fetches results listed in "automobile_make_year_bad"
33
+ When a data import verifies "Fuel efficiency should be greater than zero"
34
+ Then the verification should not be successful
35
+
36
+ Scenario: Failing to verify that volume is greater than zero
37
+ Given a "AutomobileMakeYear" data import fetches results listed in "automobile_make_year_bad"
38
+ When a data import verifies "Volume should be greater than zero"
39
+ Then the verification should not be successful
40
+
41
+ Scenario: Failing to verify that fuel efficiency units are kilometres per litre
42
+ Given a "AutomobileMakeYear" data import fetches results listed in "automobile_make_year_bad"
43
+ When a data import verifies "Fuel efficiency units should be kilometres per litre"
44
+ Then the verification should not be successful
@@ -0,0 +1,59 @@
1
+ Feature: Data import for AutomobileSizeClass
2
+ As a data user
3
+ I want to import AutomobileSizeClass data
4
+ So that I can perform size class-based calculations
5
+
6
+ Scenario: Successfully verifying that annual distance > 0
7
+ Given a "AutomobileSizeClass" data import fetches results listed in "automobile_size_class_good"
8
+ When a data import verifies "Annual distance should be greater than zero"
9
+ Then the verification should be successful
10
+
11
+ Scenario: Successfully verifying that annual distance units are kilometres
12
+ Given a "AutomobileSizeClass" data import fetches results listed in "automobile_size_class_good"
13
+ When a data import verifies "Annual distance units should be kilometres"
14
+ Then the verification should be successful
15
+
16
+ Scenario: Successfully verifying that fuel efficiencies > 0
17
+ Given a "AutomobileSizeClass" data import fetches results listed in "automobile_size_class_good"
18
+ When a data import verifies "Fuel efficiencies should be greater than zero"
19
+ Then the verification should be successful
20
+
21
+ Scenario: Successfully verifying that fuel efficiency units are kilometres per litre
22
+ Given a "AutomobileSizeClass" data import fetches results listed in "automobile_size_class_good"
23
+ When a data import verifies "Fuel efficiency units should be kilometres per litre"
24
+ Then the verification should be successful
25
+
26
+ Scenario: Successfully verifying that any fuel efficiency multipliers > 0
27
+ Given a "AutomobileSizeClass" data import fetches results listed in "automobile_size_class_good"
28
+ When a data import verifies "Any fuel efficiency multipliers should be greater than zero"
29
+ Then the verification should be successful
30
+
31
+ Scenario: Successfully verifying that fallback fuel efficiency multipliers > 0
32
+ Given a "AutomobileSizeClass" data import fetches results listed in "automobile_size_class_good"
33
+ When a data import verifies "Fallback fuel efficiency multipliers should be greater than zero"
34
+ Then the verification should be successful
35
+
36
+ Scenario: Failing to verify that annual distance > 0
37
+ Given a "AutomobileSizeClass" data import fetches results listed in "automobile_size_class_bad"
38
+ When a data import verifies "Annual distance should be greater than zero"
39
+ Then the verification should not be successful
40
+
41
+ Scenario: Failing to verify that annual distance units are kilometres
42
+ Given a "AutomobileSizeClass" data import fetches results listed in "automobile_size_class_bad"
43
+ When a data import verifies "Annual distance units should be kilometres"
44
+ Then the verification should not be successful
45
+
46
+ Scenario: Failing to verify that fuel efficiencies > 0
47
+ Given a "AutomobileSizeClass" data import fetches results listed in "automobile_size_class_bad"
48
+ When a data import verifies "Fuel efficiencies should be greater than zero"
49
+ Then the verification should not be successful
50
+
51
+ Scenario: Failing to verify that fuel efficiency units are kilometres per litre
52
+ Given a "AutomobileSizeClass" data import fetches results listed in "automobile_size_class_bad"
53
+ When a data import verifies "Fuel efficiency units should be kilometres per litre"
54
+ Then the verification should not be successful
55
+
56
+ Scenario: Failing to verify that any fuel efficiency multipliers > 0
57
+ Given a "AutomobileSizeClass" data import fetches results listed in "automobile_size_class_bad"
58
+ When a data import verifies "Any fuel efficiency multipliers should be greater than zero"
59
+ Then the verification should not be successful