public void ShardedCounterIncreaseByOne() { // arrange var shardedCounter = new ShardedCounter(); // act shardedCounter.Increase(1L); // assert shardedCounter.Count.ShouldBe(1L, "ShardedCounter did not increase by one."); }
public void ShardedCounterIncreaseByOneHundredMillion() { // arrange const long increasedCounterValue = 4999999950000000L; var shardedCounter = new ShardedCounter(); // act for (var i = 0; i < 100000000; i++) { shardedCounter.Increase(i); } // assert shardedCounter.Count.ShouldBe(increasedCounterValue, "ShardedCounter did not increase one hundred million times."); }