Click or drag to resize

SmartTestAssignT Method

Namespace:  SmartTests
Assembly:  SmartTests (in SmartTests.dll) Version: 1.7.0
Syntax
public static Act<T> Assign<T>(
	Expression<Func<T>> property,
	T value
)

Parameters

property
Type: System.Linq.ExpressionsExpressionFuncT
A lambda expression of the property to set in the Act part.
value
Type: T
The value to assign to the property.

Type Parameters

T
The type of the property to set.

Return Value

Type: ActT
The newly created AssignActT.
Examples
[Test]
public void MyPropertyTest()
{
    var mc = new MyClass( 10 );

    var result = RunTest( AnyValue.IsValid,
                          () => mc.Value );

    Assert.AreEqual( 10, result );
}
See Also