AsyncEx.Tests.AsyncParallelTests.ProcessesEverythingSyncTest C# (CSharp) Method

ProcessesEverythingSyncTest() private method

private ProcessesEverythingSyncTest ( ) : Task
return Task
        public async Task ProcessesEverythingSyncTest()
        {
            var source = Enumerable.Range(1, 100);

            int sum = 0;

            await AsyncParallel.ForEach(
                source, async i => Interlocked.Add(ref sum, i));

            Assert.AreEqual(5050, sum);
        }