public AssertionLogStream(NamedCounterAssertion increment, NamedCounterAssertion 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)
            {
                _incrementNamedCounter = increment;
            }
            if (set != null)
            {
                _setNamedCounter = set;
            }
        }
Esempio n. 2
0
 public void AssertSetNamedCounter(NamedCounterAssertion set, Action onError)
 {
     ExecuteAssert(new AssertionLogStream(null, set, onError ?? _onAssertFailure));
 }
Esempio n. 3
0
 public void AssertIncrementNamedCounter(NamedCounterAssertion increment, Action onError)
 {
     ExecuteAssert(new AssertionLogStream(increment, null, onError ?? _onAssertFailure));
 }
Esempio n. 4
0
 public void AssertSetNamedCounter(NamedCounterAssertion set)
 {
     AssertSetNamedCounter(set, null);
 }
Esempio n. 5
0
 public void AssertIncrementNamedCounter(NamedCounterAssertion increment)
 {
     AssertIncrementNamedCounter(increment, null);
 }