forked from Azure/azure-webjobs-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removing new ExecutionReason.Portal, and instead adding a new TraceLe…
…vel property on FunctionStartedMessage to control this.
- Loading branch information
Showing
8 changed files
with
56 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
test/Microsoft.Azure.WebJobs.Host.UnitTests/Protocols/FunctionStartedMessageTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for license information. | ||
|
||
using System.Diagnostics; | ||
using Microsoft.Azure.WebJobs.Host.Protocols; | ||
using Newtonsoft.Json; | ||
using Xunit; | ||
|
||
namespace Microsoft.Azure.WebJobs.Host.UnitTests.Protocols | ||
{ | ||
public class FunctionStartedMessageTests | ||
{ | ||
[Fact] | ||
public void LogLevel_IsStringEnumSerialized() | ||
{ | ||
FunctionStartedMessage message = new FunctionStartedMessage() | ||
{ | ||
LogLevel = TraceLevel.Verbose | ||
}; | ||
string json = JsonConvert.SerializeObject(message); | ||
Assert.True(json.Contains("\"LogLevel\":\"Verbose\"")); | ||
|
||
FunctionStartedMessage result = JsonConvert.DeserializeObject<FunctionStartedMessage>(json); | ||
Assert.Equal(TraceLevel.Verbose, result.LogLevel); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters