@@ -211,8 +211,7 @@ class ProjectPropertiesTest {
211211
212212 val provider = project.dirProviderFromProjectProperty(" testProperty" )
213213
214- assertThat(provider.asFile().orNull)
215- .isEqualTo(File (" /foo/bar" ))
214+ assertThat(provider.asFile().get().absolutePath.replace(' \\ ' , ' /' ).endsWith(" /foo/bar" )).isTrue()
216215 }
217216
218217 @Test
@@ -238,8 +237,7 @@ class ProjectPropertiesTest {
238237 fun `dirProviderFromProjectProperty_should use the default value if project property is not set` () {
239238 val provider = project.dirProviderFromProjectProperty(" testProperty" , " /default/path" )
240239
241- assertThat(provider.asFile().orNull)
242- .isEqualTo(File (" /default/path" ))
240+ assertThat(provider.asFile().get().absolutePath.replace(' \\ ' , ' /' ).endsWith(" /default/path" )).isTrue()
243241 }
244242
245243 @Test
@@ -257,8 +255,7 @@ class ProjectPropertiesTest {
257255
258256 val provider = project.dirProviderFromProjectProperty(" testProperty" , " /default/path" )
259257
260- assertThat(provider.asFile().orNull)
261- .isEqualTo(File (" /foo/bar" ))
258+ assertThat(provider.asFile().get().absolutePath.replace(' \\ ' , ' /' ).endsWith(" /foo/bar" )).isTrue()
262259 }
263260
264261 @Test
@@ -269,8 +266,7 @@ class ProjectPropertiesTest {
269266
270267 val provider = project.dirProviderFromProjectProperty(" testProperty" , evaluateGString = true )
271268
272- assertThat(provider.asFile().orNull)
273- .isEqualTo(File (" /foo/bar" ))
269+ assertThat(provider.asFile().get().absolutePath.replace(' \\ ' , ' /' ).endsWith(" /foo/bar" )).isTrue()
274270 }
275271
276272 @Test
@@ -280,8 +276,7 @@ class ProjectPropertiesTest {
280276
281277 val provider = project.fileProviderFromProjectProperty(" testProperty" )
282278
283- assertThat(provider.asFile().orNull)
284- .isEqualTo(File (" /foo/bar" ))
279+ assertThat(provider.asFile().get().absolutePath.replace(' \\ ' , ' /' ).endsWith(" /foo/bar" )).isTrue()
285280 }
286281
287282 @Test
@@ -307,8 +302,7 @@ class ProjectPropertiesTest {
307302 fun `fileProviderFromProjectProperty_should use the default value if project property is not set` () {
308303 val provider = project.fileProviderFromProjectProperty(" testProperty" , " /default/path" )
309304
310- assertThat(provider.asFile().orNull)
311- .isEqualTo(File (" /default/path" ))
305+ assertThat(provider.asFile().get().absolutePath.replace(' \\ ' , ' /' ).endsWith(" /default/path" )).isTrue()
312306 }
313307
314308 @Test
@@ -326,8 +320,7 @@ class ProjectPropertiesTest {
326320
327321 val provider = project.fileProviderFromProjectProperty(" testProperty" , " /default/path" )
328322
329- assertThat(provider.asFile().orNull)
330- .isEqualTo(File (" /foo/bar" ))
323+ assertThat(provider.asFile().get().absolutePath.replace(' \\ ' , ' /' ).endsWith(" /foo/bar" )).isTrue()
331324 }
332325
333326 @Test
@@ -338,8 +331,7 @@ class ProjectPropertiesTest {
338331
339332 val provider = project.fileProviderFromProjectProperty(" testProperty" , evaluateGString = true )
340333
341- assertThat(provider.asFile().orNull)
342- .isEqualTo(File (" /foo/bar" ))
334+ assertThat(provider.asFile().get().absolutePath.replace(' \\ ' , ' /' ).endsWith(" /foo/bar" )).isTrue()
343335 }
344336
345337 @Test
0 commit comments