-
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.
Merge commit '9766e70e637befbc25f43345aa1b0e0104bb1764' into perform-…
…release
- Loading branch information
Showing
22 changed files
with
686 additions
and
324 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
77 changes: 0 additions & 77 deletions
77
src/Childrens-Social-Care-CPD-Indexer.Tests/IndexingServiceTests.cs
This file was deleted.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
src/Childrens-Social-Care-CPD-Indexer.Tests/MockTelemetryClient.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,32 @@ | ||
using Microsoft.ApplicationInsights; | ||
using Microsoft.ApplicationInsights.Channel; | ||
using Microsoft.ApplicationInsights.Extensibility; | ||
using System.Collections.Concurrent; | ||
|
||
namespace Childrens_Social_Care_CPD_Indexer.Tests; | ||
|
||
internal sealed class MockTelemetryChannel : ITelemetryChannel | ||
{ | ||
public ConcurrentBag<ITelemetry> SentTelemtries = []; | ||
public bool IsFlushed { get; private set; } | ||
public bool? DeveloperMode { get; set; } | ||
public string EndpointAddress { get; set; } = string.Empty; | ||
|
||
public void Send(ITelemetry item) => SentTelemtries.Add(item); | ||
public void Flush() => IsFlushed = true; | ||
public void Dispose() {} | ||
} | ||
|
||
internal static class MockTelemetryClient | ||
{ | ||
public static TelemetryClient Create() | ||
{ | ||
var mockTelemetryConfig = new TelemetryConfiguration | ||
{ | ||
TelemetryChannel = new MockTelemetryChannel(), | ||
}; | ||
|
||
return new TelemetryClient(mockTelemetryConfig); | ||
} | ||
|
||
} |
Oops, something went wrong.