Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        public Task String_Task_Null_Action_Throws()
        {
            Action <string> action = null;

            return(Assert.ThrowsAsync <ArgumentNullException>(() => StringTask.Do(action)));
        }
Exemplo n.º 3
0
 public Task Null_Action_Throws() =>
 Assert.ThrowsAsync <ArgumentNullException>(AssertionUtilities.ActionParamName, () => StringTask.Do(null)
                                            );