-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented test for ClientIP enrichement (#15)
Test implemented using SpinWait pattern
- Loading branch information
1 parent
96993b1
commit abb0270
Showing
6 changed files
with
102 additions
and
14 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
26 changes: 26 additions & 0 deletions
26
test/ApplicationInsightsRequestLoggingTests/FakeTelemetryChannel.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,26 @@ | ||
using System.Collections.Generic; | ||
using Microsoft.ApplicationInsights.Channel; | ||
|
||
namespace ApplicationInsightsRequestLoggingTests; | ||
|
||
public class FakeTelemetryChannel : ITelemetryChannel | ||
{ | ||
public List<ITelemetry> SentTelemtries = new(); | ||
public bool IsFlushed { get; private set; } | ||
public bool? DeveloperMode { get; set; } | ||
public string EndpointAddress { get; set; } | ||
|
||
public void Send(ITelemetry item) | ||
{ | ||
SentTelemtries.Add(item); | ||
} | ||
|
||
public void Flush() | ||
{ | ||
IsFlushed = true; | ||
} | ||
|
||
public void Dispose() | ||
{ | ||
} | ||
} |
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