public void ExceptionTest13() { var inner = new InvalidOperationException("f"); var ex1 = new ConditionParseException("msg", inner); Assert.Equal("msg", ex1.Message); Assert.Same(inner, ex1.InnerException); }
public void ExceptionTest14() { var inner = new InvalidOperationException("f"); var ex1 = new ConditionParseException("msg", inner); BinaryFormatter bf = new BinaryFormatter(); MemoryStream ms = new MemoryStream(); bf.Serialize(ms, ex1); ms.Position = 0; Exception ex2 = (Exception)bf.Deserialize(ms); Assert.Equal("msg", ex2.Message); Assert.Equal("f", ex2.InnerException.Message); }
public void ExceptionTest12() { var ex1 = new ConditionParseException("msg"); Assert.Equal("msg", ex1.Message); }
public void ExceptionTest11() { var ex1 = new ConditionParseException(); Assert.NotNull(ex1.Message); }