From dd7b82c18d2ed633cf160bec7f99fec954cde1d1 Mon Sep 17 00:00:00 2001 From: Martin Machacek Date: Tue, 16 Jul 2024 14:57:23 +0200 Subject: [PATCH 1/7] Use invariant culture for (de)serialization --- src/abstractions/Time.cs | 26 +- src/serialization/form/FormParseNode.cs | 19 +- .../form/FormSerializationWriter.cs | 3 +- src/serialization/json/JsonParseNode.cs | 7 +- src/serialization/text/TextParseNode.cs | 19 +- .../text/TextSerializationWriter.cs | 17 +- .../serialization/form/FormParseNodeTests.cs | 218 ++++++++++- .../form/FormSerializationWriterTests.cs | 346 +++++++++++++++++- .../serialization/json/JsonParseNodeTests.cs | 6 + .../json/JsonSerializationWriterTests.cs | 313 ++++++++++++++++ ...soft.Kiota.Serialization.Text.Tests.csproj | 1 + tests/serialization/text/Mocks/TestEntity.cs | 12 + tests/serialization/text/Mocks/TestEnum.cs | 4 +- .../text/TextParseNodeFactoryTests.cs | 82 +++++ .../serialization/text/TextParseNodeTests.cs | 213 ++++++++++- .../TextSerializationWriterFactoryTests.cs | 36 ++ .../text/TextSerializationWriterTests.cs | 321 ++++++++++++++++ tests/serialization/text/UnitTest1.cs | 12 - 18 files changed, 1602 insertions(+), 53 deletions(-) create mode 100644 tests/serialization/text/Mocks/TestEntity.cs create mode 100644 tests/serialization/text/TextParseNodeFactoryTests.cs create mode 100644 tests/serialization/text/TextSerializationWriterFactoryTests.cs delete mode 100644 tests/serialization/text/UnitTest1.cs diff --git a/src/abstractions/Time.cs b/src/abstractions/Time.cs index fc534f5d..ffbdeb44 100644 --- a/src/abstractions/Time.cs +++ b/src/abstractions/Time.cs @@ -3,13 +3,14 @@ // ------------------------------------------------------------------------------ using System; +using System.Security; namespace Microsoft.Kiota.Abstractions { /// /// Model to represent only the date component of a DateTime /// - public struct Time + public struct Time:IEquatable