コード例 #1
0
 public void CanReserveIsConsistentAccrossReplays(Capacity sut, Guid id)
 {
     var remaining = sut.Remaining;
     sut.Reserve(remaining, id);
     var result = sut.CanReserve(remaining, id);
     Assert.True(result);
 }
コード例 #2
0
        public void CanReserveReturnsTrueWhenQuantityIsLessThanRemaining(Capacity sut, Guid id)
        {
            var lesserQuantity = sut.Remaining - 1;
            var result         = sut.CanReserve(lesserQuantity, id);

            Assert.True(result);
        }
コード例 #3
0
        public void CanReserveReturnsFalseWhenQuantityIsGreaterThanRemaining(Capacity sut, Guid id)
        {
            var  greaterQuantity = sut.Remaining + 1;
            bool result          = sut.CanReserve(greaterQuantity, id);

            Assert.False(result);
        }
コード例 #4
0
        public void CanReserveIsConsistentAccrossReplays(Capacity sut, Guid id)
        {
            var remaining = sut.Remaining;

            sut.Reserve(remaining, id);
            var result = sut.CanReserve(remaining, id);

            Assert.True(result);
        }
コード例 #5
0
 public void CanReserveReturnsTrueWhenQuantityIsLessThanRemaining(Capacity sut, Guid id)
 {
     var lesserQuantity = sut.Remaining - 1;
     var result = sut.CanReserve(lesserQuantity, id);
     Assert.True(result);
 }
コード例 #6
0
 public void CanReserveReturnsTrueWhenQuantityIsEqualToRemaining(Capacity sut, Guid id)
 {
     var result = sut.CanReserve(sut.Remaining, id);
     Assert.True(result);
 }
コード例 #7
0
 public void CanReserveReturnsFalseWhenQuantityIsGreaterThanRemaining(Capacity sut, Guid id)
 {
     var greaterQuantity = sut.Remaining + 1;
     bool result = sut.CanReserve(greaterQuantity, id);
     Assert.False(result);
 }
コード例 #8
0
        public void CanReserveReturnsTrueWhenQuantityIsEqualToRemaining(Capacity sut, Guid id)
        {
            var result = sut.CanReserve(sut.Remaining, id);

            Assert.True(result);
        }