@@ -37,62 +37,62 @@ public void has_usage() {
37
37
@ Test
38
38
public void assigns_feature_paths () {
39
39
RuntimeOptions options = new RuntimeOptions (new Properties (), "--glue" , "somewhere" , "somewhere_else" );
40
- assertEquals (asList ("somewhere_else" ), options .featurePaths );
40
+ assertEquals (asList ("somewhere_else" ), options .getFeaturePaths () );
41
41
}
42
42
43
43
@ Test
44
44
public void strips_options () {
45
45
RuntimeOptions options = new RuntimeOptions (new Properties (), " --glue " , "somewhere" , "somewhere_else" );
46
- assertEquals (asList ("somewhere_else" ), options .featurePaths );
46
+ assertEquals (asList ("somewhere_else" ), options .getFeaturePaths () );
47
47
}
48
48
49
49
@ Test
50
50
public void assigns_glue () {
51
51
RuntimeOptions options = new RuntimeOptions (new Properties (), "--glue" , "somewhere" );
52
- assertEquals (asList ("somewhere" ), options .glue );
52
+ assertEquals (asList ("somewhere" ), options .getGlue () );
53
53
}
54
54
55
55
@ Test
56
56
public void assigns_dotcucumber () throws MalformedURLException {
57
57
RuntimeOptions options = new RuntimeOptions (new Properties (), "--dotcucumber" , "somewhere" , "--glue" , "somewhere" );
58
- assertEquals (new URL ("file:somewhere/" ), options .dotCucumber );
58
+ assertEquals (new URL ("file:somewhere/" ), options .getDotCucumber () );
59
59
}
60
60
61
61
@ Test
62
62
public void creates_formatter () {
63
63
RuntimeOptions options = new RuntimeOptions (new Properties (), "--format" , "html:some/dir" , "--glue" , "somewhere" );
64
- assertEquals ("cucumber.runtime.formatter.HTMLFormatter" , options .formatters .get (0 ).getClass ().getName ());
64
+ assertEquals ("cucumber.runtime.formatter.HTMLFormatter" , options .getFormatters () .get (0 ).getClass ().getName ());
65
65
}
66
66
67
67
@ Test
68
68
public void assigns_strict () {
69
69
RuntimeOptions options = new RuntimeOptions (new Properties (), "--strict" , "--glue" , "somewhere" );
70
- assertTrue (options .strict );
70
+ assertTrue (options .isStrict () );
71
71
}
72
72
73
73
@ Test
74
74
public void assigns_strict_short () {
75
75
RuntimeOptions options = new RuntimeOptions (new Properties (), "-s" , "--glue" , "somewhere" );
76
- assertTrue (options .strict );
76
+ assertTrue (options .isStrict () );
77
77
}
78
78
79
79
@ Test
80
80
public void default_strict () {
81
81
RuntimeOptions options = new RuntimeOptions (new Properties (), "--glue" , "somewhere" );
82
- assertFalse (options .strict );
82
+ assertFalse (options .isStrict () );
83
83
}
84
84
85
85
@ Test
86
86
public void name_without_spaces_is_preserved () {
87
87
RuntimeOptions options = new RuntimeOptions (new Properties (), "--name" , "someName" );
88
- Pattern actualPattern = (Pattern ) options .filters .iterator ().next ();
88
+ Pattern actualPattern = (Pattern ) options .getFilters () .iterator ().next ();
89
89
assertEquals ("someName" , actualPattern .pattern ());
90
90
}
91
91
92
92
@ Test
93
93
public void name_with_spaces_is_preserved () {
94
94
RuntimeOptions options = new RuntimeOptions (new Properties (), "--name" , "some Name" );
95
- Pattern actualPattern = (Pattern ) options .filters .iterator ().next ();
95
+ Pattern actualPattern = (Pattern ) options .getFilters () .iterator ().next ();
96
96
assertEquals ("some Name" , actualPattern .pattern ());
97
97
}
98
98
@@ -101,7 +101,7 @@ public void ensure_name_with_spaces_works_with_cucumber_options() {
101
101
Properties properties = new Properties ();
102
102
properties .setProperty ("cucumber.options" , "--name 'some Name'" );
103
103
RuntimeOptions options = new RuntimeOptions (properties );
104
- Pattern actualPattern = (Pattern ) options .filters .iterator ().next ();
104
+ Pattern actualPattern = (Pattern ) options .getFilters () .iterator ().next ();
105
105
assertEquals ("some Name" , actualPattern .pattern ());
106
106
}
107
107
@@ -110,59 +110,59 @@ public void ensure_multiple_cucumber_options_with_spaces_parse_correctly() throw
110
110
Properties properties = new Properties ();
111
111
properties .setProperty ("cucumber.options" , "--name 'some Name' --dotcucumber 'some file\\ path'" );
112
112
RuntimeOptions options = new RuntimeOptions (properties );
113
- Pattern actualPattern = (Pattern ) options .filters .iterator ().next ();
113
+ Pattern actualPattern = (Pattern ) options .getFilters () .iterator ().next ();
114
114
assertEquals ("some Name" , actualPattern .pattern ());
115
- assertEquals (new URL ("file:some file\\ path/" ), options .dotCucumber );
115
+ assertEquals (new URL ("file:some file\\ path/" ), options .getDotCucumber () );
116
116
}
117
117
118
118
@ Test
119
119
public void overrides_options_with_system_properties_without_clobbering_non_overridden_ones () {
120
120
Properties properties = new Properties ();
121
121
properties .setProperty ("cucumber.options" , "--glue lookatme andmememe" );
122
122
RuntimeOptions options = new RuntimeOptions (properties , "--strict" , "--glue" , "somewhere" , "somewhere_else" );
123
- assertEquals (asList ("somewhere_else" , "andmememe" ), options .featurePaths );
124
- assertEquals (asList ("somewhere" , "lookatme" ), options .glue );
125
- assertTrue (options .strict );
123
+ assertEquals (asList ("somewhere_else" , "andmememe" ), options .getFeaturePaths () );
124
+ assertEquals (asList ("somewhere" , "lookatme" ), options .getGlue () );
125
+ assertTrue (options .isStrict () );
126
126
}
127
127
128
128
@ Test
129
129
public void ensure_cli_glue_is_preserved_when_cucumber_options_property_defined () {
130
130
Properties properties = new Properties ();
131
131
properties .setProperty ("cucumber.options" , "--tags @foo" );
132
132
RuntimeOptions runtimeOptions = new RuntimeOptions (properties , "--glue" , "somewhere" );
133
- assertEquals (asList ("somewhere" ), runtimeOptions .glue );
133
+ assertEquals (asList ("somewhere" ), runtimeOptions .getGlue () );
134
134
}
135
135
136
136
@ Test
137
137
public void ensure_feature_paths_are_appended_to_when_cucumber_options_property_defined () {
138
138
Properties properties = new Properties ();
139
139
properties .setProperty ("cucumber.options" , "somewhere_else" );
140
140
RuntimeOptions runtimeOptions = new RuntimeOptions (properties , "somewhere" );
141
- assertEquals (asList ("somewhere" , "somewhere_else" ), runtimeOptions .featurePaths );
141
+ assertEquals (asList ("somewhere" , "somewhere_else" ), runtimeOptions .getFeaturePaths () );
142
142
}
143
143
144
144
@ Test
145
145
public void clobber_filters_from_cli_if_filters_specified_in_cucumber_options_property () {
146
146
Properties properties = new Properties ();
147
147
properties .setProperty ("cucumber.options" , "--tags @clobber_with_this" );
148
148
RuntimeOptions runtimeOptions = new RuntimeOptions (properties , "--tags" , "@should_be_clobbered" );
149
- assertEquals (asList ("@clobber_with_this" ), runtimeOptions .filters );
149
+ assertEquals (asList ("@clobber_with_this" ), runtimeOptions .getFilters () );
150
150
}
151
151
152
152
@ Test
153
153
public void preserves_filters_from_cli_if_filters_not_specified_in_cucumber_options_property () {
154
154
Properties properties = new Properties ();
155
155
properties .setProperty ("cucumber.options" , "--strict" );
156
156
RuntimeOptions runtimeOptions = new RuntimeOptions (properties , "--tags" , "@keep_this" );
157
- assertEquals (asList ("@keep_this" ), runtimeOptions .filters );
157
+ assertEquals (asList ("@keep_this" ), runtimeOptions .getFilters () );
158
158
}
159
159
160
160
@ Test
161
161
public void allows_removal_of_strict_in_cucumber_options_property () {
162
162
Properties properties = new Properties ();
163
163
properties .setProperty ("cucumber.options" , "--no-strict" );
164
164
RuntimeOptions runtimeOptions = new RuntimeOptions (properties , "--strict" );
165
- assertFalse (runtimeOptions .strict );
165
+ assertFalse (runtimeOptions .isStrict () );
166
166
}
167
167
168
168
@ Test
0 commit comments