Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Bump xunit.runner.visualstudio from 2.5.5 to 2.5.6 #97

Merged
Merged
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
2 changes: 1 addition & 1 deletion tests/Microsoft.Kiota.Serialization.Form.Tests.csproj
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="17.8.0" />
<PackageReference Include="Moq" Version="4.20.70" />
<PackageReference Include="xunit" Version="2.6.4" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.5">
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>

Unchanged files with check annotations Beta

}
[Theory]
[InlineData(null)]

Check warning on line 32 in tests/FormParseNodeFactoryTests.cs

GitHub Actions / build-and-test

Null should not be used for type parameter 'contentType' of type 'string'. Use a non-null value, or convert the parameter to a nullable type. (https://xunit.net/xunit.analyzers/rules/xUnit1012)

Check warning on line 32 in tests/FormParseNodeFactoryTests.cs

GitHub Actions / build-and-test

Null should not be used for type parameter 'contentType' of type 'string'. Use a non-null value, or convert the parameter to a nullable type. (https://xunit.net/xunit.analyzers/rules/xUnit1012)

Check warning on line 32 in tests/FormParseNodeFactoryTests.cs

GitHub Actions / build-and-test

Null should not be used for type parameter 'contentType' of type 'string'. Use a non-null value, or convert the parameter to a nullable type. (https://xunit.net/xunit.analyzers/rules/xUnit1012)

Check warning on line 32 in tests/FormParseNodeFactoryTests.cs

GitHub Actions / build-and-test

Null should not be used for type parameter 'contentType' of type 'string'. Use a non-null value, or convert the parameter to a nullable type. (https://xunit.net/xunit.analyzers/rules/xUnit1012)
[InlineData("")]
public void ThrowsArgumentNullExceptionForNoContentType(string contentType)
{
}
[Theory]
[InlineData(null)]

Check warning on line 28 in tests/FormSerializationWriterFactoryTests.cs

GitHub Actions / build-and-test

Null should not be used for type parameter 'contentType' of type 'string'. Use a non-null value, or convert the parameter to a nullable type. (https://xunit.net/xunit.analyzers/rules/xUnit1012)

Check warning on line 28 in tests/FormSerializationWriterFactoryTests.cs

GitHub Actions / build-and-test

Null should not be used for type parameter 'contentType' of type 'string'. Use a non-null value, or convert the parameter to a nullable type. (https://xunit.net/xunit.analyzers/rules/xUnit1012)

Check warning on line 28 in tests/FormSerializationWriterFactoryTests.cs

GitHub Actions / build-and-test

Null should not be used for type parameter 'contentType' of type 'string'. Use a non-null value, or convert the parameter to a nullable type. (https://xunit.net/xunit.analyzers/rules/xUnit1012)

Check warning on line 28 in tests/FormSerializationWriterFactoryTests.cs

GitHub Actions / build-and-test

Null should not be used for type parameter 'contentType' of type 'string'. Use a non-null value, or convert the parameter to a nullable type. (https://xunit.net/xunit.analyzers/rules/xUnit1012)
[InlineData("")]
public void ThrowsArgumentNullExceptionForNoContentType(string contentType)
{
namespace Microsoft.Kiota.Serialization.Form;
/// <summary>Represents a serialization writer that can be used to write a form url encoded string.</summary>
public class FormSerializationWriter : ISerializationWriter

Check warning on line 14 in src/FormSerializationWriter.cs

GitHub Actions / Build

Fix this implementation of 'IDisposable' to conform to the dispose pattern. (https://rules.sonarsource.com/csharp/RSPEC-3881)

Check warning on line 14 in src/FormSerializationWriter.cs

GitHub Actions / Build

Fix this implementation of 'IDisposable' to conform to the dispose pattern. (https://rules.sonarsource.com/csharp/RSPEC-3881)
{
private int depth;
private readonly StringBuilder _builder = new();
{
if(depth > 0) throw new InvalidOperationException("Form serialization does not support nested objects.");
depth++;
if(value == null && !additionalValuesToMerge.Any(static x => x != null)) return;

Check warning on line 165 in src/FormSerializationWriter.cs

GitHub Actions / Build

Collection-specific "Exists" method should be used instead of the "Any" extension. (https://rules.sonarsource.com/csharp/RSPEC-6605)

Check warning on line 165 in src/FormSerializationWriter.cs

GitHub Actions / Build

Collection-specific "Exists" method should be used instead of the "Any" extension. (https://rules.sonarsource.com/csharp/RSPEC-6605)
if(value != null) {
OnBeforeObjectSerialization?.Invoke(value);
OnStartObjectSerialization?.Invoke(value, this);
/// Get the collection of primitives of type <typeparam name="T"/>from the form node
/// </summary>
/// <returns>A collection of objects</returns>
public IEnumerable<T> GetCollectionOfPrimitiveValues<T>()

Check warning on line 73 in src/FormParseNode.cs

GitHub Actions / Build

Refactor this method to reduce its Cognitive Complexity from 16 to the 15 allowed. (https://rules.sonarsource.com/csharp/RSPEC-3776)

Check warning on line 73 in src/FormParseNode.cs

GitHub Actions / Build

Refactor this method to reduce its Cognitive Complexity from 16 to the 15 allowed. (https://rules.sonarsource.com/csharp/RSPEC-3776)
{
var genericType = typeof(T);
var primitiveValueCollection = DecodedValue.Split(new[] { ',' } , StringSplitOptions.RemoveEmptyEntries);
}
}
/// <inheritdoc/>
public DateTimeOffset? GetDateTimeOffsetValue() => DateTimeOffset.TryParse(DecodedValue, out var result) ? result : null;

Check warning on line 115 in src/FormParseNode.cs

GitHub Actions / Build

Use a format provider when parsing date and time. (https://rules.sonarsource.com/csharp/RSPEC-6580)

Check warning on line 115 in src/FormParseNode.cs

GitHub Actions / Build

Use a format provider when parsing date and time. (https://rules.sonarsource.com/csharp/RSPEC-6580)
/// <inheritdoc/>
public Date? GetDateValue() => DateTime.TryParse(DecodedValue, out var result) ? new Date(result) : null;

Check warning on line 117 in src/FormParseNode.cs

GitHub Actions / Build

Use a format provider when parsing date and time. (https://rules.sonarsource.com/csharp/RSPEC-6580)
/// <inheritdoc/>
public decimal? GetDecimalValue() => decimal.TryParse(DecodedValue, out var result) ? result : null;
/// <inheritdoc/>
return XmlConvert.ToTimeSpan(rawString);
}
/// <inheritdoc/>
public Time? GetTimeValue() => DateTime.TryParse(DecodedValue, out var result) ? new Time(result) : null;

Check warning on line 189 in src/FormParseNode.cs

GitHub Actions / Build

Use a format provider when parsing date and time. (https://rules.sonarsource.com/csharp/RSPEC-6580)
#if NET5_0_OR_GREATER
IEnumerable<T?> IParseNode.GetCollectionOfEnumValues<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)]T>()
#else