public void constructor_should_initialize_instance() { var result = new GridFSChunkException(123, 2, "missing"); result.Message.Should().Contain("file id 123"); result.Message.Should().Contain("chunk 2"); result.Message.Should().Contain("missing"); }
public void constructor_should_initialize_instance() { var result = new GridFSChunkException(123, 2, "missing"); result.Message.Should().Contain("file id 123"); result.Message.Should().Contain("chunk 2"); result.Message.Should().Contain("missing"); }
public void Serialization_should_work() { var subject = new GridFSChunkException(123, 2, "missing"); var formatter = new BinaryFormatter(); using (var stream = new MemoryStream()) { formatter.Serialize(stream, subject); stream.Position = 0; var rehydrated = (GridFSChunkException)formatter.Deserialize(stream); rehydrated.Message.Should().Be(subject.Message); } }