コード例 #1
0
        public void build_by_exception()
        {
            var exception = new NotImplementedException("What?");

            var report = new ExceptionReport(exception);

            report.Message.ShouldEqual(exception.Message);
            report.ExceptionText.ShouldEqual(exception.ToString());
            report.ExceptionType = "NotImplementedException";
        }
コード例 #2
0
        public void build_by_exception_and_message()
        {
            var exception = new NotImplementedException("What?");

            var report = new ExceptionReport("Something went wrong!", exception);

            report.Message.ShouldEqual("Something went wrong!");
            report.ExceptionText.ShouldEqual(exception.ToString());
            report.ExceptionType = "NotImplementedException";
        }
コード例 #3
0
 public bool Equals(ExceptionReport other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Equals(other.Message, Message) && Equals(other.ExceptionText, ExceptionText) &&
            Equals(other.CorrelationId, CorrelationId));
 }