BrokeredServiceContractTestBase<TInterface,TServiceMock> 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
用來測試 Visual Studio 代理服務合約的基類。
public abstract class BrokeredServiceContractTestBase<TInterface,TServiceMock> : Microsoft.VisualStudio.Sdk.TestFramework.LoggingTestBase, Xunit.IAsyncLifetime where TInterface : class where TServiceMock : TInterface, new()
type BrokeredServiceContractTestBase<'Interface, #'Interface (requires 'Interface : null)> = class
inherit LoggingTestBase
interface IAsyncLifetime
Public MustInherit Class BrokeredServiceContractTestBase(Of TInterface, TServiceMock)
Inherits LoggingTestBase
Implements IAsyncLifetime
類型參數
- TInterface
服務介面。
- TServiceMock
模擬服務的類別。
- 繼承
- 實作
-
Xunit.IAsyncLifetime
建構函式
BrokeredServiceContractTestBase<TInterface,TServiceMock>(ITestOutputHelper, ServiceRpcDescriptor) |
初始化 BrokeredServiceContractTestBase<TInterface,TServiceMock> 類別的新執行個體。 |
屬性
ClientProxy |
取得或設定用戶端 Proxy,測試將用來與模擬 Service互動。 |
DefaultTestsEnabled |
取得或設定值,指出基類上 BrokeredServiceContractTestBase<TInterface,TServiceMock> 定義的慣例測試是否應該以衍生測試類別的一部分執行。 |
Descriptor |
取得產品將用來要求或擷取代理服務的描述項。 |
DescriptorLoggingVerbosity |
取得或設定用於記錄客戶端與服務之間 RPC 呼叫相關訊息的詳細資訊層級。 |
ExpectedTimeout |
取得相當短的時間週期,以 等候預期的逾 時。 (繼承來源 TestBase) |
ExpectedTimeoutToken |
取得從擷取這個屬性之後取消的新初始化CancellationTokenExpectedTimeout。 (繼承來源 TestBase) |
Logger |
取得目前 記錄器。 (繼承來源 LoggingTestBase) |
MultiplexingLoggingVerbosity |
取得或設定用於記錄與相關的 Nerdbank.Streams.MultiplexingStream訊息的詳細資訊層級。 |
Service |
取得或設定模擬服務實作。 |
TestStopwatch |
取得具現化測試類別時啟動的停止監看式。 (繼承來源 TestBase) |
TimeoutToken |
取得在具現化測試類別之後取消 UnexpectedTimeout 的令牌。 (繼承來源 TestBase) |
UnexpectedTimeout |
取得相當長的時間週期,以等候我們預期發生其他事件的位置,而不是等候整個時間週期的正常測試執行。 (繼承來源 TestBase) |
UnexpectedTimeoutToken |
取得從擷取這個屬性之後取消的新初始化CancellationTokenUnexpectedTimeout。 (繼承來源 TestBase) |
方法
AllMethodsIncludeCancellationToken() |
確認服務介面上的所有方法都包含 CancellationToken 做為最後一個參數。 |
AssertEventRaisedAsync(Action<TInterface,EventHandler>, Action<TInterface,EventHandler>, Action<TServiceMock>) |
判斷提示事件是以預期的數據引發。 |
AssertEventRaisedAsync<TEventArgs>(Action<TInterface,EventHandler<TEventArgs>>, Action<TInterface,EventHandler<TEventArgs>>, Action<TServiceMock>, Action<TEventArgs>) |
判斷提示事件是以預期的數據引發。 |
Dispose() |
用來測試 Visual Studio 代理服務合約的基類。 (繼承來源 TestBase) |
Dispose(Boolean) |
處置這個 物件所擁有的Managed和Unmanaged資源。 (繼承來源 LoggingTestBase) |
DisposeAsync() |
用來測試 Visual Studio 代理服務合約的基類。 |
InitializeAsync() |
用來測試 Visual Studio 代理服務合約的基類。 |