public void Add_Test()
        {
            var atomicInteger = new AtomicInteger();
            var result        = atomicInteger.Add(2);

            Assert.Equal(2, result);
        }
Example #2
0
 public void ShouldAddToValueUsingFunction()
 {
     var atomicInt = new AtomicInteger();
     const int expected = 100;
     atomicInt.Add(x => expected);
     Assert.AreEqual(expected, atomicInt.Value);
 }
Example #3
0
        public void ShouldAddToValue()
        {
            var       atomicInt = new AtomicInteger();
            const int expected  = 100;

            atomicInt.Add(expected);
            Assert.AreEqual(expected, atomicInt.Value);
        }
Example #4
0
 public void can_add_value()
 {
     _num.Add(7).Should().Be(7);
     _num.GetValue().Should().Be(7);
 }