コード例 #1
0
        public void ConstructWithMessageWithSuccess(RunnerException rex, Exception e)
        {
            "Given the runner exception"
            .x(() => rex.Should().BeNull());

            "When constructing with a message"
            .x(() => e = Record.Exception(() => new RunnerException("an error message")));

            "Then the runner exception constructor should succeed"
            .x(() => e.Should().BeNull());
        }
コード例 #2
0
        public void ConstructWithNullMessage(RunnerException rex, Exception e)
        {
            "Given the runner exception"
            .x(() => rex.Should().BeNull());

            "When constructing with null message"
            .x(() => e = Record.Exception(() => new RunnerException(null)));

            "Then the runner exception constructor should succeed"
            .x(() => e.Should().BeNull());
        }
コード例 #3
0
        public void ConstructWithNullInnerException(RunnerException rex, Exception inner, Exception e)
        {
            "Given the runner exception"
            .x(() => rex.Should().BeNull());

            "And a null inner exception"
            .x(() => inner.Should().BeNull());

            "When constructing with null message"
            .x(() => e = Record.Exception(() => new RunnerException("an error message", inner)));

            "Then the runner exception constructor should succeed"
            .x(() => e.Should().BeNull());
        }