TestContextManager クラス
- java.
lang. Object - com.
azure. core. test. TestContextManager
- com.
public class TestContextManager
このクラスは、カスタム テスト注釈などのテストに関するコンテキストの管理と、テストが実行できるかどうかを検証します。
コンストラクターの概要
メソッドの概要
修飾子と型 | メソッドと説明 |
---|---|
boolean |
didTestRun()
現在のテストが実行されたかどうかを返します。 |
boolean |
doNotRecordTest()
テストの実行中 RECORD に、テストのネットワーク呼び出しを記録する必要があるかどうかを返します。 |
Test |
getTestMode()
テストの実行に使用されているモードを返します。 |
String |
getTestName()
実行されているテストの名前を返します。 |
String |
getTestPlaybackRecordingName()
実行されているテストの再生レコードの名前を返します。 |
boolean |
isTestProxyEnabled()
テスト プロキシが有効になっている場合は を返します。 |
boolean |
skipRecordingRequestBody()
テストが実行 RECORD モード時に要求本文を記録しているかどうかを返します。 |
メソッドの継承元: java.lang.Object
コンストラクターの詳細
TestContextManager
public TestContextManager(Method testMethod, TestMode testMode)
TestContextManagerテスト メソッドに基づいて を構築します。
Parameters:
TestContextManager
public TestContextManager(Method testMethod, TestMode testMode, boolean enableTestProxy, boolean recordWithoutRequestBodyClassAnnotation, Path testClassPath)
TestContextManagerテスト メソッドに基づいて を構築します。
Parameters:
RecordWithoutRequestBody
示すフラグ。
メソッドの詳細
didTestRun
public boolean didTestRun()
現在のテストが実行されたかどうかを返します。
Returns:
doNotRecordTest
public boolean doNotRecordTest()
テストの実行中 RECORD に、テストのネットワーク呼び出しを記録する必要があるかどうかを返します。
Returns:
getTestMode
getTestName
public String getTestName()
実行されているテストの名前を返します。
Returns:
getTestPlaybackRecordingName
public String getTestPlaybackRecordingName()
実行されているテストの再生レコードの名前を返します。
Returns:
isTestProxyEnabled
public boolean isTestProxyEnabled()
テスト プロキシが有効になっている場合は を返します。
Returns:
skipRecordingRequestBody
public boolean skipRecordingRequestBody()
テストが実行 RECORD モード時に要求本文を記録しているかどうかを返します。
Returns:
適用対象
Azure SDK for Java