public void Stress_Increment_RetainsAccuracy()
        {
            const int iterations = 100000;
            var counter = new InterlockingLongCounter();
            var tasks = new List<Task>();
            for (var i = 0; i < iterations; i++)
            {
                var task = Task.Run(() => counter.Increment());
                tasks.Add(task);
            }

            Task.WaitAll(tasks.ToArray());
            Assert.Equal(iterations, counter.Get());
        }
 public void Increment_Increments()
 {
     var counter = new InterlockingLongCounter();
     counter.Increment();
     Assert.Equal(1, counter.Get());
 }