public AssertionLogStream(CounterAssertion increment, CounterAssertion set, Action onError)
        {
            if (onError == null)
            {
                throw new ArgumentNullException("onError");
            }
            if (increment == null && set == null)
            {
                throw new ArgumentNullException("increment and set");
            }

            initializeDelegates(_onError = onError);

            if (increment != null)
            {
                _incrementRawCounter = increment;
            }
            if (set != null)
            {
                _setRawCounter = set;
            }
        }
Exemple #2
0
 public void AssertSetRawCounter(CounterAssertion set, Action onError)
 {
     ExecuteAssert(new AssertionLogStream(null, set, onError ?? _onAssertFailure));
 }
Exemple #3
0
 public void AssertIncrementRawCounter(CounterAssertion increment, Action onError)
 {
     ExecuteAssert(new AssertionLogStream(increment, null, onError ?? _onAssertFailure));
 }
Exemple #4
0
 public void AssertSetRawCounter(CounterAssertion set)
 {
     AssertSetRawCounter(set, null);
 }
Exemple #5
0
 public void AssertIncrementRawCounter(CounterAssertion increment)
 {
     AssertIncrementRawCounter(increment, null);
 }