Пример #1
0
        public void ConstructorTest()
        {
            Action        action    = new Mock <Action>().Object;
            VoidAssertion assertion = new VoidAssertion(_handler.Object, action);

            Assert.Same(_handler.Object, assertion.FailureHandler);
        }
Пример #2
0
        public void ThrowsExactlyExceptionFailTest()
        {
            ExceptionAssertion result = new VoidAssertion(_handler.Object, DoNothing).ThrowsExactlyException <ArgumentException>();

            _handler.Verify(x => x.Fail(It.IsAny <string>()), Times.Once());
            Assert.Null(result);
        }