-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove Moq from Instrumentation.StackExchangeRedis.Tests (#1481)
- Loading branch information
Showing
4 changed files
with
91 additions
and
61 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
52 changes: 52 additions & 0 deletions
52
test/OpenTelemetry.Instrumentation.StackExchangeRedis.Tests/TestProfiledCommand.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,52 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
using System; | ||
using System.Net; | ||
using StackExchange.Redis; | ||
using StackExchange.Redis.Profiling; | ||
|
||
namespace OpenTelemetry.Instrumentation.StackExchangeRedis.Tests; | ||
|
||
internal class TestProfiledCommand(DateTime commandCreated) : IProfiledCommand | ||
{ | ||
private readonly DateTime commandCreated = commandCreated; | ||
private readonly CommandFlags flags = CommandFlags.None; | ||
private readonly EndPoint endPoint = new IPEndPoint(0, 0); | ||
|
||
public TestProfiledCommand(DateTime commandCreated, CommandFlags flags) | ||
: this(commandCreated) | ||
{ | ||
this.flags = flags; | ||
} | ||
|
||
public TestProfiledCommand(DateTime commandCreated, EndPoint endpoint) | ||
: this(commandCreated) | ||
{ | ||
this.endPoint = endpoint; | ||
} | ||
|
||
public EndPoint EndPoint => this.endPoint; | ||
|
||
public int Db => 0; | ||
|
||
public string Command => "SET"; | ||
|
||
public CommandFlags Flags => this.flags; | ||
|
||
public DateTime CommandCreated => this.commandCreated; | ||
|
||
public TimeSpan CreationToEnqueued => default; | ||
|
||
public TimeSpan EnqueuedToSending => default; | ||
|
||
public TimeSpan SentToResponse => default; | ||
|
||
public TimeSpan ResponseToCompletion => default; | ||
|
||
public TimeSpan ElapsedTime => default; | ||
|
||
public IProfiledCommand RetransmissionOf => throw new NotImplementedException(); | ||
|
||
public RetransmissionReasonType? RetransmissionReason => throw new NotImplementedException(); | ||
} |