-Added line number information to deserialization errors

-Added BinaryReader/BinaryWriter constructor overloads to BsonReader/BsonWriter
This commit is contained in:
JamesNK
2012-01-19 05:48:24 +00:00
parent b146481c87
commit a9e100e0a7
19 changed files with 260 additions and 176 deletions
@@ -7,7 +7,7 @@ namespace Newtonsoft.Json.Tests.Serialization
public class ConstructorHandlingTests : TestFixtureBase
{
[Test]
[ExpectedException(typeof(JsonSerializationException), ExpectedMessage = "Unable to find a constructor to use for type Newtonsoft.Json.Tests.TestObjects.PrivateConstructorTestClass. A class should either have a default constructor, one constructor with arguments or a constructor marked with the JsonConstructor attribute.")]
[ExpectedException(typeof(JsonSerializationException), ExpectedMessage = "Unable to find a constructor to use for type Newtonsoft.Json.Tests.TestObjects.PrivateConstructorTestClass. A class should either have a default constructor, one constructor with arguments or a constructor marked with the JsonConstructor attribute. Line 1, position 6.")]
public void FailWithPrivateConstructorAndDefault()
{
string json = @"{Name:""Name!""}";