From 0bd2b3d31e43dc0e125a92e16524f807f928bbd9 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 1 Aug 2024 16:10:55 -0400 Subject: [PATCH] fix: failing unit tests due to missing enum members attributes --- .../TestModels/EnumType.cs | 3 +++ .../TestModels/EnumTypeWithFlags.cs | 5 ++++- .../TestModels/ServiceModels/TestBodyType.cs | 4 ++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/EnumType.cs b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/EnumType.cs index a91e10082..ce69f97ba 100644 --- a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/EnumType.cs +++ b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/EnumType.cs @@ -3,6 +3,8 @@ // ------------------------------------------------------------------------------ +using System.Runtime.Serialization; + namespace Microsoft.Graph.DotnetCore.Core.Test.TestModels { /// @@ -10,6 +12,7 @@ namespace Microsoft.Graph.DotnetCore.Core.Test.TestModels /// public enum EnumType { + [EnumMember(Value = "value")] Value, } } diff --git a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/EnumTypeWithFlags.cs b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/EnumTypeWithFlags.cs index ba0bf4c42..8cb8dd0ca 100644 --- a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/EnumTypeWithFlags.cs +++ b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/EnumTypeWithFlags.cs @@ -3,6 +3,8 @@ // ------------------------------------------------------------------------------ +using System.Runtime.Serialization; + namespace Microsoft.Graph.DotnetCore.Core.Test.TestModels { /// @@ -11,8 +13,9 @@ namespace Microsoft.Graph.DotnetCore.Core.Test.TestModels [System.Flags] public enum EnumTypeWithFlags { + [EnumMember(Value = "firstValue")] FirstValue = 1, - + [EnumMember(Value = "secondValue")] SecondValue = 2 } } \ No newline at end of file diff --git a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestBodyType.cs b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestBodyType.cs index 430e80121..2a9960e0f 100644 --- a/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestBodyType.cs +++ b/tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestBodyType.cs @@ -2,6 +2,8 @@ // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. // ------------------------------------------------------------------------------ +using System.Runtime.Serialization; + namespace Microsoft.Graph.DotnetCore.Core.Test.TestModels.ServiceModels { /// @@ -13,11 +15,13 @@ public enum TestBodyType /// /// Text /// + [EnumMember(Value = "text")] Text = 0, /// /// Html /// + [EnumMember(Value = "html")] Html = 1, }