Skip to content

Commit c1d798b

Browse files
committed
fix: failing unit tests due to missing enum members attributes
1 parent 8f16353 commit c1d798b

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/EnumType.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@
33
// ------------------------------------------------------------------------------
44

55

6+
using System.Runtime.Serialization;
7+
68
namespace Microsoft.Graph.DotnetCore.Core.Test.TestModels
79
{
810
/// <summary>
911
/// Enum for testing enum serialization and deserialization.
1012
/// </summary>
1113
public enum EnumType
1214
{
15+
[EnumMember(Value = "value")]
1316
Value,
1417
}
1518
}

tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/EnumTypeWithFlags.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
// ------------------------------------------------------------------------------
44

55

6+
using System.Runtime.Serialization;
7+
68
namespace Microsoft.Graph.DotnetCore.Core.Test.TestModels
79
{
810
/// <summary>
@@ -11,8 +13,9 @@ namespace Microsoft.Graph.DotnetCore.Core.Test.TestModels
1113
[System.Flags]
1214
public enum EnumTypeWithFlags
1315
{
16+
[EnumMember(Value = "firstValue")]
1417
FirstValue = 1,
15-
18+
[EnumMember(Value = "secondValue")]
1619
SecondValue = 2
1720
}
1821
}

tests/Microsoft.Graph.DotnetCore.Core.Test/TestModels/ServiceModels/TestBodyType.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
33
// ------------------------------------------------------------------------------
44

5+
using System.Runtime.Serialization;
6+
57
namespace Microsoft.Graph.DotnetCore.Core.Test.TestModels.ServiceModels
68
{
79
/// <summary>
@@ -13,11 +15,13 @@ public enum TestBodyType
1315
/// <summary>
1416
/// Text
1517
/// </summary>
18+
[EnumMember(Value = "text")]
1619
Text = 0,
1720

1821
/// <summary>
1922
/// Html
2023
/// </summary>
24+
[EnumMember(Value = "html")]
2125
Html = 1,
2226

2327
}

0 commit comments

Comments
 (0)