@@ -25,6 +25,7 @@ public void SetUp()
25
25
_customPackageInformation = Enumerable . Empty < CustomPackageInformation > ( ) . ToList ( ) ;
26
26
_fixture = new Fixture ( ) . Customize ( new AutoNSubstituteCustomization ( ) ) ;
27
27
_fixture . Customizations . Add ( new NuGetVersionBuilder ( ) ) ;
28
+ _fixture . Customizations . Add ( new CustomPackageInformationBuilderWithOptionalFileds ( ) ) ;
28
29
_repositories = Array . Empty < ISourceRepository > ( ) ;
29
30
_globalPackagesFolderUtility = Substitute . For < IGlobalPackagesFolderUtility > ( ) ;
30
31
@@ -93,15 +94,15 @@ private static void CheckResult(ReferencedPackageWithContext[] result,
93
94
LicenseType licenseType )
94
95
{
95
96
Assert . That ( packages , Is . EquivalentTo ( result . Select ( s => new CustomPackageInformation ( s . PackageInfo . Identity . Id ,
96
- s . PackageInfo . Identity . Version ,
97
- s . PackageInfo . LicenseMetadata ! . License ,
98
- s . PackageInfo . LicenseUrl ,
99
- s . PackageInfo . Copyright ,
100
- s . PackageInfo . Authors ,
101
- s . PackageInfo . Title ,
102
- s . PackageInfo . ProjectUrl ,
103
- s . PackageInfo . Summary ,
104
- s . PackageInfo . Description ) ) ) ) ;
97
+ s . PackageInfo . Identity . Version ,
98
+ s . PackageInfo . LicenseMetadata ! . License ,
99
+ s . PackageInfo . Copyright ,
100
+ s . PackageInfo . Authors ,
101
+ s . PackageInfo . Title ,
102
+ s . PackageInfo . ProjectUrl ,
103
+ s . PackageInfo . Summary ,
104
+ s . PackageInfo . Description ,
105
+ s . PackageInfo . LicenseUrl ) ) ) ) ;
105
106
foreach ( ReferencedPackageWithContext r in result )
106
107
{
107
108
Assert . That ( r . Context , Is . EqualTo ( project ) ) ;
@@ -125,6 +126,7 @@ public async Task GetPackageInfo_Should_PreferLocalPackageCacheOverRepositories(
125
126
mockedInfo . ProjectUrl . Returns ( info . ProjectUrl ) ;
126
127
mockedInfo . Summary . Returns ( info . Summary ) ;
127
128
mockedInfo . Description . Returns ( info . Description ) ;
129
+ mockedInfo . LicenseUrl . Returns ( info . LicenseUrl ) ;
128
130
mockedInfo . LicenseMetadata . Returns ( new LicenseMetadata ( LicenseType . Expression , info . License ) ) ;
129
131
mockedInfo . LicenseUrl . Returns ( info . LicenseUrl ) ;
130
132
_globalPackagesFolderUtility . GetPackage ( identity ) . Returns ( mockedInfo ) ;
@@ -156,6 +158,7 @@ private static void SetupPackagesForRepositories(IEnumerable<CustomPackageInform
156
158
resultingInfo . Summary . Returns ( package . Summary ) ;
157
159
resultingInfo . Description . Returns ( package . Description ) ;
158
160
resultingInfo . ProjectUrl . Returns ( package . ProjectUrl ) ;
161
+ resultingInfo . LicenseUrl . Returns ( package . LicenseUrl ) ;
159
162
160
163
metadataReturningProperInformation . TryGetMetadataAsync ( new PackageIdentity ( package . Id , package . Version ) , Arg . Any < CancellationToken > ( ) ) .
161
164
Returns ( _ => Task . FromResult < IPackageMetadata ? > ( resultingInfo ) ) ;
0 commit comments