Ejemplo n.º 1
0
        public void ShouldHaveInitialAvailableCapacity()
        {
            var dependentSequence = new Mock <Sequence>();

            Sequence[] dependentSequences = { dependentSequence.Object };

            Assert.IsTrue(_claimStrategy.HasAvailableCapacity(1, dependentSequences));
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Has the buffer got capacity to allocate another sequence.  This is a concurrent
 /// method so the response should only be taken as an indication of available capacity.
 /// </summary>
 /// <param name="availableCapacity">availableCapacity in the buffer</param>
 /// <returns>true if the buffer has the capacity to allocate the next sequence otherwise false.</returns>
 public bool HasAvailableCapacity(int availableCapacity)
 {
     return(_claimStrategy.HasAvailableCapacity(availableCapacity, _gatingSequences));
 }