ThreadStaticTests NewThreadStaticVariableHasNoCurrentValue Method Delta Engine Documentation

Namespace: DeltaEngine.Tests.Extensions
Assembly: DeltaEngine.Tests (in DeltaEngine.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void NewThreadStaticVariableHasNoCurrentValue()
Examples

[Test]
public void NewThreadStaticVariableHasNoCurrentValue()
{
    var threadStatic = new ThreadStatic<string>();
    Assert.IsFalse(threadStatic.HasCurrent);
    Assert.Throws<ThreadStatic<string>.NoValueAvailable>(
        () => Assert.IsNotNull(threadStatic.Current));
}
See Also