File tree Expand file tree Collapse file tree
src/NuGetGallery/Services
tests/NuGetGallery.Facts/Services Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- // Copyright (c) .NET Foundation. All rights reserved.
1+ // Copyright (c) .NET Foundation. All rights reserved.
22// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33
44using System ;
@@ -148,7 +148,7 @@ public async Task<UpdateDeprecationError> UpdateDeprecation(
148148 foreach ( var version in versions )
149149 {
150150 var normalizedVersion = NuGetVersionFormatter . Normalize ( version ) ;
151- var package = packages . SingleOrDefault ( v => v . NormalizedVersion == normalizedVersion ) ;
151+ var package = packages . SingleOrDefault ( v => StringComparer . OrdinalIgnoreCase . Equals ( v . NormalizedVersion , normalizedVersion ) ) ;
152152 if ( package == null )
153153 {
154154 return new UpdateDeprecationError (
@@ -181,4 +181,4 @@ await _deprecationService.UpdateDeprecation(
181181 return null ;
182182 }
183183 }
184- }
184+ }
Original file line number Diff line number Diff line change 1- // Copyright (c) .NET Foundation. All rights reserved.
1+ // Copyright (c) .NET Foundation. All rights reserved.
22// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33
44using System ;
@@ -856,7 +856,7 @@ private async Task AssertSuccessful(
856856
857857 var package2 = new Package
858858 {
859- NormalizedVersion = "1.0.0" ,
859+ NormalizedVersion = "1.0.0-RC1 " ,
860860 PackageRegistration = registration
861861 } ;
862862
@@ -932,7 +932,7 @@ private async Task AssertSuccessful(
932932
933933 var service = GetService < PackageDeprecationManagementService > ( ) ;
934934
935- var packageNormalizedVersions = new [ ] { package . NormalizedVersion , package2 . NormalizedVersion } ;
935+ var packageNormalizedVersions = new [ ] { package . NormalizedVersion , package2 . NormalizedVersion . ToLowerInvariant ( ) } ;
936936
937937 // Act
938938 var result = await InvokeUpdateDeprecation (
@@ -981,4 +981,4 @@ private static Task<UpdateDeprecationError> InvokeUpdateDeprecation(
981981 }
982982 }
983983 }
984- }
984+ }
You can’t perform that action at this time.
0 commit comments