Given.Common.TestStateManager.AddGiven C# (CSharp) Method

AddGiven() public method

public AddGiven ( string text, Delegate method ) : void
text string
method System.Delegate
return void
        public void AddGiven(string text, Delegate method)
        {
            Givens.Add(method, text);
        }

Usage Example

Ejemplo n.º 1
0
 void ProcessGiven()
 {
     //execute all given items found.
     _fields.Where(fieldInfo => fieldInfo.FieldType == typeof(given))
     .Select(fieldInfo => new { Delegate = (given)fieldInfo.GetValue(_testClass), Field = fieldInfo }).ToList()
     .ForEach(x =>
     {
         x.Delegate.Invoke();
         _testStateManager.AddGiven(x.Field.Name, x.Delegate);
     });
 }