File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed
tests/KubernetesClient.Tests Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change 27
27
</PropertyGroup >
28
28
29
29
<ItemGroup >
30
- <PackageReference Include =" Microsoft.AspNetCore.JsonPatch" Version =" 1.1.2" />
30
+ <PackageReference Include =" Microsoft.AspNetCore.JsonPatch" Version =" 1.1.2" Condition =" '$(TargetFramework)' != 'netstandard2.0' and '$(TargetFramework)' != 'netcoreapp2.1'" />
31
+ <PackageReference Include =" Microsoft.AspNetCore.JsonPatch" Version =" 3.0.0" Condition =" '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netcoreapp2.1'" />
31
32
<PackageReference Include =" Nerdbank.GitVersioning" Version =" 2.3.138" PrivateAssets =" all" />
32
33
<PackageReference Include =" Portable.BouncyCastle" Version =" 1.8.1.3" />
33
34
<PackageReference Include =" Microsoft.AspNetCore.WebUtilities" Version =" 1.1.2" />
34
35
<PackageReference Include =" Microsoft.Rest.ClientRuntime" Version =" 2.3.10" />
35
36
<PackageReference Include =" MSBuild.Sdk.Extras" Version =" 1.6.68" PrivateAssets =" all" Condition =" '$(MSBuildRuntimeType)' != 'Core'" />
36
- <PackageReference Include =" Newtonsoft.Json" Version =" 9.0.1" />
37
+ <PackageReference Include =" Newtonsoft.Json" Version =" 9.0.1" Condition =" '$(TargetFramework)' != 'netstandard2.0' and '$(TargetFramework)' != 'netcoreapp2.1'" />
38
+ <PackageReference Include =" Newtonsoft.Json" Version =" 12.0.2" Condition =" '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netcoreapp2.1'" />
37
39
<PackageReference Include =" YamlDotNet" Version =" 6.0.0" />
38
40
<PackageReference Include =" Microsoft.SourceLink.GitHub" Version =" 1.0.0-beta2-18618-05" PrivateAssets =" All" />
39
41
</ItemGroup >
Original file line number Diff line number Diff line change
1
+ using System . Linq ;
2
+ using k8s . Models ;
3
+ using Microsoft . AspNetCore . JsonPatch ;
4
+ using Xunit ;
5
+
6
+ namespace k8s . Tests
7
+ {
8
+ public class JsonPatchTests
9
+ {
10
+ [ Fact ]
11
+ public void PathContainsUpperCase ( )
12
+ {
13
+ var patch = new JsonPatchDocument < V1HorizontalPodAutoscaler > ( ) ;
14
+ patch . Replace ( h => h . Spec . MinReplicas , 1 ) ;
15
+
16
+ Assert . Equal ( "/spec/minReplicas" , patch . Operations . Single ( ) . path ) ;
17
+ }
18
+ }
19
+ }
You can’t perform that action at this time.
0 commit comments