public void DisposeDelegateThrew_NotifierIsCalled() { InitActionsWith(_throwingDelegates); _actions.Dispose(_fakeResource); var expectedErrorData = new UserDefinedActionError<TestResource> { UserDefinedActionType = UserDefinedActionType.Disposing, Object = _fakeResource, Exception = new AccessViolationException(), }; _notifierMock.Verify(x => x.Notify(expectedErrorData), Times.Once); }
public void ValidationDelegateThrew_NotifierIsCalled() { InitActionsWith(_throwingDelegates); _actions.IsValid(_fakeResource); var expectedErrorData = new UserDefinedActionError<TestResource> { UserDefinedActionType = UserDefinedActionType.CheckingValidness, Object = _fakeResource, Exception = new WebException(), }; _notifierMock.Verify(x => x.Notify(expectedErrorData), Times.Once); }
public void ResetDelegateThrew_NotifierIsCalled() { InitActionsWith(_throwingDelegates); _actions.Reset(_fakeResource); var expectedErrorData = new UserDefinedActionError<TestResource> { UserDefinedActionType = UserDefinedActionType.Resetting, Object = _fakeResource, Exception = new IndexOutOfRangeException(), }; _notifierMock.Verify(x => x.Notify(expectedErrorData), Times.Once); }