@@ -212,7 +212,7 @@ public void DependencyFulfilledByProjectReferenceExplicitMetadata ()
212212 ] ,
213213 ProjectReferences = [
214214 CreateAndroidLibraryTaskItem ( "Google.Material.Core.csproj" , null , "com.google.android:material-core:1.0" ) ,
215- CreateAndroidLibraryTaskItem ( "Google.Material.Foo.csproj" , null , "org.jetbrains.kotlin:kotlin-stdlib:2.0.0, com.google.android:material-foo:1.0" ) ,
215+ CreateAndroidLibraryTaskItem ( "Google.Material.Foo.csproj" , null , "org.jetbrains.kotlin:kotlin-stdlib:2.0.0; com.google.android:material-foo:1.0" ) ,
216216 ] ,
217217 } ;
218218
@@ -238,7 +238,7 @@ public void DependencyFulfilledByPackageReferenceExplicitMetadata ()
238238 ] ,
239239 PackageReferences = [
240240 CreateAndroidLibraryTaskItem ( "Xamarin.Google.Material.Core" , null , "com.google.android:material-core:1.0" ) ,
241- CreateAndroidLibraryTaskItem ( "Xamarin.Google.Material.Foo" , null , "org.jetbrains.kotlin:kotlin-stdlib:2.0.0, com.google.android:material-foo:1.0" ) ,
241+ CreateAndroidLibraryTaskItem ( "Xamarin.Google.Material.Foo" , null , "org.jetbrains.kotlin:kotlin-stdlib:2.0.0 com.google.android:material-foo:1.0" ) ,
242242 ] ,
243243 } ;
244244
@@ -264,7 +264,7 @@ public void DependencyIgnored ()
264264 ] ,
265265 IgnoredDependencies = [
266266 CreateAndroidLibraryTaskItem ( "com.google.android:material-core:1.0" ) ,
267- CreateAndroidLibraryTaskItem ( "org.jetbrains.kotlin:kotlin-stdlib:2.0.0,com .google.android:material-foo:1.0" ) ,
267+ CreateAndroidLibraryTaskItem ( "org.jetbrains.kotlin:kotlin-stdlib:2.0.0\r \n com .google.android:material-foo:1.0" ) ,
268268 ] ,
269269 } ;
270270
@@ -320,6 +320,26 @@ public void DependencyWithoutVersionNotFulfilled ()
320320 Assert . AreEqual ( "Java dependency 'com.google.android:material-core' is not satisfied." , engine . Errors [ 0 ] . Message ) ;
321321 }
322322
323+ [ TestCase ( "artifact_versioned=androidx.core:core:1.2.0" , "androidx.core:core:1.2.0" ) ]
324+ [ TestCase ( "artifact_versioned=androidx.core:core" , "" ) ] // Invalid specification
325+ [ TestCase ( "artifact_versioned=androidx.core:core:1.2.0 artifact_versioned=androidx.core:core:1.2.0" , "androidx.core:core:1.2.0" ) ] // Duplicates are ignored
326+ [ TestCase ( "artifact_versioned=androidx.core:core:1.2.0 artifact_versioned=androidx.window.extensions.core:core:1.0.0" , "androidx.core:core:1.2.0|androidx.window.extensions.core:core:1.0.0" ) ]
327+ [ TestCase ( "artifact_versioned=androidx.core:core:1.2.0 artifact=androidx.window.extensions.core:core:1.13.1" , "androidx.core:core:1.2.0|androidx.window.extensions.core:core:1.13.1" ) ]
328+ [ TestCase ( "artifact=androidx.core:core:1.2.0 artifact=androidx.window.extensions.core:core:1.13.1" , "androidx.core:core:1.2.0|androidx.window.extensions.core:core:1.13.1" ) ]
329+ public void AddArtifactsFromNuspecTagsTests ( string tags , string expected )
330+ {
331+ var results = new List < Artifact > ( ) ;
332+
333+ NuGetPackageVersionFinder . AddArtifactsFromNuspecTags ( results , tags ) ;
334+
335+ if ( ! expected . HasValue ( ) ) {
336+ Assert . IsEmpty ( results ) ;
337+ return ;
338+ }
339+
340+ Assert . AreEqual ( expected , string . Join ( "|" , results . Select ( p => p . VersionedArtifactString ) ) ) ;
341+ }
342+
323343 TaskItem CreateAndroidLibraryTaskItem ( string name , string ? manifest = null , string ? javaArtifact = null )
324344 {
325345 var item = new TaskItem ( name ) ;
0 commit comments