public void can_transfer_fubuexception_across_boundaries()
 {
     var original = new FubuException(42, "The answer to {0}, the {1} and {2}", "life", "universe", "everything");
     var transferred = original.ShouldTransferViaSerialization();
     transferred.ErrorCode.ShouldEqual(original.ErrorCode);
     transferred.Message.ShouldEqual(original.Message);
 }
        public void can_transfer_fubuexception_across_boundaries()
        {
            var original    = new FubuException(42, "The answer to {0}, the {1} and {2}", "life", "universe", "everything");
            var transferred = original.ShouldTransferViaSerialization();

            transferred.ErrorCode.ShouldEqual(original.ErrorCode);
            transferred.Message.ShouldEqual(original.Message);
        }
Exemple #3
0
        public void should_throw_fubu_exception_2201()
        {
            FubuException fubuException = typeof(FubuException).ShouldBeThrownBy(() =>
                                                                                 resolver.BindModel(_type, data)) as FubuException;

            fubuException.ShouldNotBeNull().Message.ShouldEqual(
                "FubuMVC Error 2201:  \nFatal error while binding model of type {0}.  See inner exception"
                .ToFormat(_type.AssemblyQualifiedName));
        }
Exemple #4
0
        public void run_exception_case()
        {
            var ex = new FubuException(400, "Bad!");

            var handler = MockRepository.GenerateMock <Action <Exception> >();

            TimeoutRunner.Run(1.Seconds(), () => {
                throw ex;
            },
                              handler).ShouldBe(Completion.Exception);
        }