@@ -110,24 +110,24 @@ public void testExceptionOnTooManyMajors() {
110110
111111 public void testWireCompatible () {
112112 assertVersionsEquals (
113- singletonList ("6.5.0-SNAPSHOT " ),
113+ asList ("6.5.0" ),
114114 getVersionCollection ("7.0.0-alpha1" ).getWireCompatible ()
115115 );
116116 assertVersionsEquals (
117117 asList (
118118 "5.6.0" , "5.6.1" , "5.6.2" , "5.6.3" , "5.6.4" , "5.6.5" , "5.6.6" , "5.6.7" , "5.6.8" , "5.6.9" , "5.6.10" ,
119- "5.6.11" , "5.6.12" , "5.6.13-SNAPSHOT " ,
119+ "5.6.11" , "5.6.12" , "5.6.13" ,
120120 "6.0.0" , "6.0.1" , "6.1.0" , "6.1.1" , "6.1.2" , "6.1.3" , "6.1.4" ,
121121 "6.2.0" , "6.2.1" , "6.2.2" , "6.2.3" , "6.2.4" ,
122- "6.3.0" , "6.3.1" , "6.3.2" , "6.4.0" , "6.4.1" , "6.4.2-SNAPSHOT "
122+ "6.3.0" , "6.3.1" , "6.3.2" , "6.4.0" , "6.4.1" , "6.4.2"
123123 ),
124124 getVersionCollection ("6.5.0" ).getWireCompatible ()
125125 );
126126
127127 assertVersionsEquals (
128128 asList (
129129 "5.6.0" , "5.6.1" , "5.6.2" , "5.6.3" , "5.6.4" , "5.6.5" , "5.6.6" , "5.6.7" , "5.6.8" , "5.6.9" , "5.6.10" ,
130- "5.6.11" , "5.6.12" , "5.6.13-SNAPSHOT " , "6.0.0" , "6.0.1" , "6.1.0" , "6.1.1" , "6.1.2" , "6.1.3" , "6.1.4" ,
130+ "5.6.11" , "5.6.12" , "5.6.13" , "6.0.0" , "6.0.1" , "6.1.0" , "6.1.1" , "6.1.2" , "6.1.3" , "6.1.4" ,
131131 "6.2.0" , "6.2.1" , "6.2.2" , "6.2.3" , "6.2.4" , "6.3.0" , "6.3.1" , "6.3.2" , "6.4.0" , "6.4.1"
132132 ),
133133 getVersionCollection ("6.4.2" ).getWireCompatible ()
@@ -136,16 +136,16 @@ public void testWireCompatible() {
136136 assertVersionsEquals (
137137 asList (
138138 "5.6.0" , "5.6.1" , "5.6.2" , "5.6.3" , "5.6.4" , "5.6.5" , "5.6.6" , "5.6.7" , "5.6.8" , "5.6.9" , "5.6.10" ,
139- "5.6.11" , "5.6.12" , "5.6.13-SNAPSHOT " ,
139+ "5.6.11" , "5.6.12" , "5.6.13" ,
140140 "6.0.0" , "6.0.1" , "6.1.0" , "6.1.1" , "6.1.2" , "6.1.3" , "6.1.4" ,
141141 "6.2.0" , "6.2.1" , "6.2.2" , "6.2.3" , "6.2.4" ,
142- "6.3.0" , "6.3.1" , "6.3.2" , "6.4.0" , "6.4.1" , "6.4.2-SNAPSHOT " , "6.5.0-SNAPSHOT "
142+ "6.3.0" , "6.3.1" , "6.3.2" , "6.4.0" , "6.4.1" , "6.4.2" , "6.5.0"
143143 ),
144144 getVersionCollection ("6.6.0" ).getWireCompatible ()
145145 );
146146
147147 assertVersionsEquals (
148- singletonList ("7.3.0" ),
148+ asList ("7.3.0" ),
149149 getVersionCollection ("8.0.0" ).getWireCompatible ()
150150 );
151151 assertVersionsEquals (
@@ -157,26 +157,26 @@ public void testWireCompatible() {
157157
158158 public void testWireCompatibleUnreleased () {
159159 assertVersionsEquals (
160- singletonList ("6.5.0-SNAPSHOT " ),
160+ asList ("6.5.0" ),
161161 getVersionCollection ("7.0.0-alpha1" ).getUnreleasedWireCompatible ()
162162 );
163163 assertVersionsEquals (
164- asList ("5.6.13-SNAPSHOT " , "6.4.2-SNAPSHOT " ),
164+ asList ("5.6.13" , "6.4.2" ),
165165 getVersionCollection ("6.5.0" ).getUnreleasedWireCompatible ()
166166 );
167167
168168 assertVersionsEquals (
169- singletonList ("5.6.13-SNAPSHOT " ),
169+ asList ("5.6.13" ),
170170 getVersionCollection ("6.4.2" ).getUnreleasedWireCompatible ()
171171 );
172172
173173 assertVersionsEquals (
174- asList ("5.6.13-SNAPSHOT " , "6.4.2-SNAPSHOT " , "6.5.0-SNAPSHOT " ),
174+ asList ("5.6.13" , "6.4.2" , "6.5.0" ),
175175 getVersionCollection ("6.6.0" ).getUnreleasedWireCompatible ()
176176 );
177177
178178 assertVersionsEquals (
179- singletonList ("7.3.0" ),
179+ asList ("7.3.0" ),
180180 getVersionCollection ("8.0.0" ).getUnreleasedWireCompatible ()
181181 );
182182 assertVersionsEquals (
@@ -190,7 +190,7 @@ public void testIndexCompatible() {
190190 asList (
191191 "6.0.0" , "6.0.1" , "6.1.0" , "6.1.1" , "6.1.2" , "6.1.3" , "6.1.4" ,
192192 "6.2.0" , "6.2.1" , "6.2.2" , "6.2.3" , "6.2.4" , "6.3.0" , "6.3.1" ,
193- "6.3.2" , "6.4.0" , "6.4.1" , "6.4.2-SNAPSHOT " , "6.5.0-SNAPSHOT "
193+ "6.3.2" , "6.4.0" , "6.4.1" , "6.4.2" , "6.5.0"
194194 ),
195195 getVersionCollection ("7.0.0-alpha1" ).getIndexCompatible ()
196196 );
@@ -199,9 +199,9 @@ public void testIndexCompatible() {
199199 asList (
200200 "5.0.0" , "5.0.1" , "5.0.2" , "5.1.1" , "5.1.2" , "5.2.0" , "5.2.1" , "5.2.2" , "5.3.0" , "5.3.1" , "5.3.2" , "5.3.3" ,
201201 "5.4.0" , "5.4.1" , "5.4.2" , "5.4.3" , "5.5.0" , "5.5.1" , "5.5.2" , "5.5.3" , "5.6.0" , "5.6.1" , "5.6.2" , "5.6.3" ,
202- "5.6.4" , "5.6.5" , "5.6.6" , "5.6.7" , "5.6.8" , "5.6.9" , "5.6.10" , "5.6.11" , "5.6.12" , "5.6.13-SNAPSHOT " ,
202+ "5.6.4" , "5.6.5" , "5.6.6" , "5.6.7" , "5.6.8" , "5.6.9" , "5.6.10" , "5.6.11" , "5.6.12" , "5.6.13" ,
203203 "6.0.0" , "6.0.1" , "6.1.0" , "6.1.1" , "6.1.2" , "6.1.3" , "6.1.4" , "6.2.0" , "6.2.1" , "6.2.2" , "6.2.3" , "6.2.4" ,
204- "6.3.0" , "6.3.1" , "6.3.2" , "6.4.0" , "6.4.1" , "6.4.2-SNAPSHOT "
204+ "6.3.0" , "6.3.1" , "6.3.2" , "6.4.0" , "6.4.1" , "6.4.2"
205205 ),
206206 getVersionCollection ("6.5.0" ).getIndexCompatible ()
207207 );
@@ -210,7 +210,7 @@ public void testIndexCompatible() {
210210 asList (
211211 "5.0.0" , "5.0.1" , "5.0.2" , "5.1.1" , "5.1.2" , "5.2.0" , "5.2.1" , "5.2.2" , "5.3.0" , "5.3.1" , "5.3.2" , "5.3.3" ,
212212 "5.4.0" , "5.4.1" , "5.4.2" , "5.4.3" , "5.5.0" , "5.5.1" , "5.5.2" , "5.5.3" , "5.6.0" , "5.6.1" , "5.6.2" , "5.6.3" ,
213- "5.6.4" , "5.6.5" , "5.6.6" , "5.6.7" , "5.6.8" , "5.6.9" , "5.6.10" , "5.6.11" , "5.6.12" , "5.6.13-SNAPSHOT " ,
213+ "5.6.4" , "5.6.5" , "5.6.6" , "5.6.7" , "5.6.8" , "5.6.9" , "5.6.10" , "5.6.11" , "5.6.12" , "5.6.13" ,
214214 "6.0.0" , "6.0.1" , "6.1.0" , "6.1.1" , "6.1.2" , "6.1.3" , "6.1.4" , "6.2.0" , "6.2.1" , "6.2.2" , "6.2.3" , "6.2.4" ,
215215 "6.3.0" , "6.3.1" , "6.3.2" , "6.4.0" , "6.4.1"
216216 ),
@@ -221,9 +221,9 @@ public void testIndexCompatible() {
221221 asList (
222222 "5.0.0" , "5.0.1" , "5.0.2" , "5.1.1" , "5.1.2" , "5.2.0" , "5.2.1" , "5.2.2" , "5.3.0" , "5.3.1" , "5.3.2" , "5.3.3" ,
223223 "5.4.0" , "5.4.1" , "5.4.2" , "5.4.3" , "5.5.0" , "5.5.1" , "5.5.2" , "5.5.3" , "5.6.0" , "5.6.1" , "5.6.2" , "5.6.3" ,
224- "5.6.4" , "5.6.5" , "5.6.6" , "5.6.7" , "5.6.8" , "5.6.9" , "5.6.10" , "5.6.11" , "5.6.12" , "5.6.13-SNAPSHOT " ,
224+ "5.6.4" , "5.6.5" , "5.6.6" , "5.6.7" , "5.6.8" , "5.6.9" , "5.6.10" , "5.6.11" , "5.6.12" , "5.6.13" ,
225225 "6.0.0" , "6.0.1" , "6.1.0" , "6.1.1" , "6.1.2" , "6.1.3" , "6.1.4" , "6.2.0" , "6.2.1" , "6.2.2" , "6.2.3" , "6.2.4" ,
226- "6.3.0" , "6.3.1" , "6.3.2" , "6.4.0" , "6.4.1" , "6.4.2-SNAPSHOT " , "6.5.0-SNAPSHOT "
226+ "6.3.0" , "6.3.1" , "6.3.2" , "6.4.0" , "6.4.1" , "6.4.2" , "6.5.0"
227227 ),
228228 getVersionCollection ("6.6.0" ).getIndexCompatible ()
229229 );
@@ -236,22 +236,22 @@ public void testIndexCompatible() {
236236
237237 public void testIndexCompatibleUnreleased () {
238238 assertVersionsEquals (
239- asList ("6.4.2-SNAPSHOT " , "6.5.0-SNAPSHOT " ),
239+ asList ("6.4.2" , "6.5.0" ),
240240 getVersionCollection ("7.0.0-alpha1" ).getUnreleasedIndexCompatible ()
241241 );
242242
243243 assertVersionsEquals (
244- asList ("5.6.13-SNAPSHOT " , "6.4.2-SNAPSHOT " ),
244+ asList ("5.6.13" , "6.4.2" ),
245245 getVersionCollection ("6.5.0" ).getUnreleasedIndexCompatible ()
246246 );
247247
248248 assertVersionsEquals (
249- singletonList ("5.6.13-SNAPSHOT " ),
249+ asList ("5.6.13" ),
250250 getVersionCollection ("6.4.2" ).getUnreleasedIndexCompatible ()
251251 );
252252
253253 assertVersionsEquals (
254- asList ("5.6.13-SNAPSHOT " , "6.4.2-SNAPSHOT " , "6.5.0-SNAPSHOT " ),
254+ asList ("5.6.13" , "6.4.2" , "6.5.0" ),
255255 getVersionCollection ("6.6.0" ).getUnreleasedIndexCompatible ()
256256 );
257257
@@ -315,29 +315,29 @@ public void testGetBranch() {
315315 );
316316 }
317317
318- public void testGetGradleProjectName () {
319- assertUnreleasedGradleProjectNames (
320- asList ("bugfix" , "minor" ),
318+ public void testGetGradleProjectPath () {
319+ assertUnreleasedGradleProjectPaths (
320+ asList (":distribution:bwc: bugfix" , ":distribution:bwc: minor" ),
321321 getVersionCollection ("7.0.0-alpha1" )
322322 );
323- assertUnreleasedGradleProjectNames (
324- asList ("maintenance" , "bugfix" ),
323+ assertUnreleasedGradleProjectPaths (
324+ asList (":distribution:bwc: maintenance" , ":distribution:bwc: bugfix" ),
325325 getVersionCollection ("6.5.0" )
326326 );
327- assertUnreleasedGradleProjectNames (
328- singletonList ("maintenance" ),
327+ assertUnreleasedGradleProjectPaths (
328+ singletonList (":distribution:bwc: maintenance" ),
329329 getVersionCollection ("6.4.2" )
330330 );
331- assertUnreleasedGradleProjectNames (
332- asList ("maintenance" , "bugfix" , "minor" ),
331+ assertUnreleasedGradleProjectPaths (
332+ asList (":distribution:bwc: maintenance" , ":distribution:bwc: bugfix" , ":distribution:bwc: minor" ),
333333 getVersionCollection ("6.6.0" )
334334 );
335- assertUnreleasedGradleProjectNames (
336- asList ("bugfix" , "staged" , "minor" ),
335+ assertUnreleasedGradleProjectPaths (
336+ asList (":distribution:bwc: bugfix" , ":distribution:bwc: staged" , ":distribution:bwc: minor" ),
337337 getVersionCollection ("8.0.0" )
338338 );
339- assertUnreleasedGradleProjectNames (
340- asList ("maintenance" , "staged" , "minor" ),
339+ assertUnreleasedGradleProjectPaths (
340+ asList (":distribution:bwc: maintenance" , ":distribution:bwc: staged" , ":distribution:bwc: minor" ),
341341 getVersionCollection ("7.1.0" )
342342 );
343343 }
@@ -390,10 +390,10 @@ public void testCompareToAuthoritativeNotReallyRelesed() {
390390 vc .compareToAuthoritative (authoritativeReleasedVersions );
391391 }
392392
393- private void assertUnreleasedGradleProjectNames (List <String > expectedNAmes , VersionCollection versionCollection ) {
393+ private void assertUnreleasedGradleProjectPaths (List <String > expectedNAmes , VersionCollection versionCollection ) {
394394 List <String > actualNames = new ArrayList <>();
395395 versionCollection .forPreviousUnreleased (unreleasedVersion ->
396- actualNames .add (unreleasedVersion .gradleProjectName )
396+ actualNames .add (unreleasedVersion .gradleProjectPath )
397397 );
398398 assertEquals (expectedNAmes , actualNames );
399399 }
0 commit comments