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

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

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