Exemple #1
0
        public void GenericErrorResult_AssertionCallbackIsCalled()
        {
            var  input     = ActResult.ThrewException <int>(new Exception());
            var  underTest = new Acted <int>(input);
            bool called    = false;

            underTest.Assert(r => called = true);

            Assert.IsTrue(called);
        }
Exemple #2
0
        public void GenericOkResult_AssertionCallbackIsCalled()
        {
            var  input     = ActResult.Ok(1);
            var  underTest = new Acted <int>(input);
            bool called    = false;

            underTest.Assert(r => called = true);

            Assert.IsTrue(called);
        }
Exemple #3
0
        public void OkResult_EmptyAssertReturnsAssertionRoot()
        {
            var input     = ActResult.Ok();
            var underTest = new Acted(input);

            var result = underTest.Assert();

            Assert.IsNotNull(result);
            Assert.IsInstanceOfType(result, typeof(AssertionRoot));
        }
Exemple #4
0
        public void GenericErrorResult_EmptyAssertReturnsAssertionRoot()
        {
            var input     = ActResult.ThrewException <int>(new Exception());
            var underTest = new Acted <int>(input);

            var result = underTest.Assert();

            Assert.IsNotNull(result);
            Assert.IsInstanceOfType(result, typeof(AssertionRoot));
        }