public async Task String_Task_Assign_Variable_In_Outer_Scope() { var stringLength = 0; var task = StringTask.Do(s => stringLength = s.Length); Assert.Equal(0, stringLength); var str = await task; Assert.Equal(str.Length, stringLength); }
public Task String_Task_Null_Action_Throws() { Action <string> action = null; return(Assert.ThrowsAsync <ArgumentNullException>(() => StringTask.Do(action))); }
public Task Null_Action_Throws() => Assert.ThrowsAsync <ArgumentNullException>(AssertionUtilities.ActionParamName, () => StringTask.Do(null) );