Exemplo n.º 1
0
        public void ConstructorTest()
        {
            Action        action    = new Mock <Action>().Object;
            VoidAssertion assertion = new VoidAssertion(_handler.Object, action);

            Assert.Same(_handler.Object, assertion.FailureHandler);
        }
Exemplo n.º 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);
        }