Table of Contents

Class TestContextExtensions

Namespace
Xping.Sdk.Core.Extensions
Assembly
Xping.Sdk.Core.dll

Provides extension methods for the TestContext class to access property bag values.

public static class TestContextExtensions
Inheritance
TestContextExtensions
Inherited Members

Methods

GetNonSerializablePropertyBagValue<TValue>(TestContext, PropertyBagKey)

Gets a non-serializable value from the property bag of the test context.

public static TValue? GetNonSerializablePropertyBagValue<TValue>(this TestContext context, PropertyBagKey key)

Parameters

context TestContext

The test context to get the value from.

key PropertyBagKey

The key of the value to get.

Returns

TValue

The value associated with the key, or null if not found.

Type Parameters

TValue

The type of the value to get.

GetPropertyBagValue<TValue>(TestContext, PropertyBagKey)

Gets a serializable value from the property bag of the test context.

public static TValue? GetPropertyBagValue<TValue>(this TestContext context, PropertyBagKey key)

Parameters

context TestContext

The test context to get the value from.

key PropertyBagKey

The key of the value to get.

Returns

TValue

The value associated with the key, or null if not found.

Type Parameters

TValue

The type of the value to get.