public void constructor_with_messsage_and_innerException_should_initialize_instance() { var innerException = new Exception(); var result = new GridFSException("message", innerException); result.Message.Should().Be("message"); result.InnerException.Should().BeSameAs(innerException); }
public void Serialization_should_work() { var subject = new GridFSException("message", new Exception("inner")); var formatter = new BinaryFormatter(); using (var stream = new MemoryStream()) { formatter.Serialize(stream, subject); stream.Position = 0; var rehydrated = (GridFSException)formatter.Deserialize(stream); rehydrated.Message.Should().Be(subject.Message); rehydrated.InnerException.Message.Should().Be(subject.InnerException.Message); } }
public void constructor_with_messsage_should_initialize_instance() { var result = new GridFSException("message"); result.Message.Should().Be("message"); }