Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions APIMatic.Core.Test/APIMatic.Core.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="coverlet.msbuild" Version="3.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="SonarAnalyzer.CSharp" Version="8.48.0.56517">
<PackageReference Include="SonarAnalyzer.CSharp" Version="8.51.0.59060">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
<PackageReference Include="NUnit3TestAdapter" Version="4.3.1" />
<PackageReference Include="RichardSzalay.MockHttp" Version="6.0.0" />
<PackageReference Include="System.Net.Http.Json" Version="7.0.0" />
<PackageReference Include="System.Net.Http.Json" Version="7.0.1" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions APIMatic.Core/APIMatic.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@

<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.Json.Pointer" Version="2.2.0" />
<PackageReference Include="Polly" Version="7.2.1" />
<PackageReference Include="SonarAnalyzer.CSharp" Version="8.48.0.56517">
<PackageReference Include="Microsoft.Json.Pointer" Version="2.3.0" />
<PackageReference Include="Polly" Version="7.2.3" />
<PackageReference Include="SonarAnalyzer.CSharp" Version="8.55.0.65544">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="System.Collections.Immutable" Version="1.5.0" />
<PackageReference Include="System.Collections.Immutable" Version="7.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion APIMatic.Core/Types/VoidType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ namespace APIMatic.Core.Types
/// <summary>
/// This represents the void ReturnType for API calls
/// </summary>
public class VoidType { }
public interface VoidType { }
}
22 changes: 2 additions & 20 deletions APIMatic.Core/Utilities/TestHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -503,30 +503,12 @@ private static bool DoesRightValContainsSameItems(JArray leftJArray, object righ

private static bool ListContainsJObject(JArray jArray)
{
bool containsJObject = false;
foreach (var item in jArray)
{
if (item is JObject)
{
containsJObject = true;
break;
}
}
return containsJObject;
return jArray.Any(item => item is JObject);
}

private static bool IsArrayOfJObject(JArray jArray)
{
bool listOfJObject = true;
foreach (var item in jArray)
{
if (!(item is JObject))
{
listOfJObject = false;
break;
}
}
return listOfJObject;
return jArray.All(item => item is JObject);
}
}
}
2 changes: 1 addition & 1 deletion APIMatic.Core/Utilities/XmlUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public static List<T> NativeTypesArrayFromXml<T>(string text)

foreach (Match m in mc)
{
val = m.Value.TrimStart('>').TrimEnd(new char[] { '<', '/' });
val = m.Value.TrimStart('>').TrimEnd('<', '/');
list.Add((T)Convert.ChangeType(val, typeof(T)));
}

Expand Down