I'm the Director for Research and Development for ProPhoenix, a public safety software company. This position allows me to investigate new and existing technologies and incorporate them into our product line, with the end goal being to help public safety agencies to do their jobs more effeciently and safely.
\r\n\r\n
I'm an advocate for PowerShell, as I believe it encourages administrative best practices and allows developers to provide additional access to their applications, without needing to explicity write code for each administrative feature. Part of my advocacy for PowerShell includes my blog, appearances on various podcasts, and acting as a Community Director for PowerShellCommunity.Org
\r\n\r\n
I’m also a co-host of Mind of Root (a weekly audio podcast about systems administration, tech news, and topics).
\r\n", reader.Value);
+ Assert.AreEqual("
I'm the Director for Research and Development for ProPhoenix, a public safety software company. This position allows me to investigate new and existing technologies and incorporate them into our product line, with the end goal being to help public safety agencies to do their jobs more effeciently and safely.
\r\n\r\n
I'm an advocate for PowerShell, as I believe it encourages administrative best practices and allows developers to provide additional access to their applications, without needing to explicity write code for each administrative feature. Part of my advocacy for PowerShell includes my blog, appearances on various podcasts, and acting as a Community Director for PowerShellCommunity.Org
\r\n\r\n
I’m also a co-host of Mind of Root (a weekly audio podcast about systems administration, tech news, and topics).
\r\n", reader.Value);
Assert.AreEqual(typeof(string), reader.ValueType);
Assert.IsTrue(reader.Read());
diff --git a/Src/Newtonsoft.Json.Tests/JsonTextReaderTest.cs b/Src/Newtonsoft.Json.Tests/JsonTextReaderTest.cs
index a4cf9e24..d52f5650 100644
--- a/Src/Newtonsoft.Json.Tests/JsonTextReaderTest.cs
+++ b/Src/Newtonsoft.Json.Tests/JsonTextReaderTest.cs
@@ -344,7 +344,7 @@ third line", jsonTextReader.Value);
Assert.IsTrue(reader.Read());
Assert.AreEqual(JsonToken.String, reader.TokenType);
- Assert.AreEqual("#C16------------------------------\r\n#C12Ingredients #C20\r\n#C16------------------------------\r\n\r\na piece of Leather Armor\r\n( ie #L \"Enhanced Leather Armor Boots\" \"85644\" )\r\n\r\n\r\n#L \"Hacker Tool\" \"87814\"\r\n\r\n\r\n#L \"Clanalizer\" \"208313\"\r\n\r\n\r\n#C16------------------------------\r\n#C12Recipe #C16\r\n#C16------------------------------#C20\r\n\r\nHacker Tool\r\n#C15+#C20\r\na piece of Leather Armor\r\n#C15=#C20\r\n\r\na piece of Hacked Leather Armor\r\n( ie : #L \"Hacked Leather Armor Boots\" \"245979\" )\r\n#C16Skills: | BE |#C20\r\n\r\n#C14------------------------------#C20\r\n\r\nClanalizer\r\n#C15+#C20\r\na piece of Hacked Leather Armor\r\n#C15=#C20\r\n\r\na piece of Apocalypse Leather Armor\r\n( ie : #L \"Apocalypse Leather Armor Boots\" \"245966\" )\r\n#C16Skills: | ?? |#C20\r\n\r\n#C16------------------------------\r\n#C12Details#C16\r\n#C16------------------------------#C20\r\n\r\n#L \"Apocalypse Leather Armor Boots\" \"245967\"\r\n#L \"Apocalypse Leather Armor Gloves\" \"245969\"\r\n#L \"Apocalypse Leather Armor Helmet\" \"245975\"\r\n#L \"Apocalypse Leather Armor Pants\" \"245971\"\r\n#L \"Apocalypse Leather Armor Sleeves\" \"245973\"\r\n#L \"Apocalypse Leather Body Armor\" \"245965\"\r\n\r\n#C16------------------------------\r\n#C12Comments#C16\r\n#C16------------------------------#C20\r\n\r\nNice froob armor.. but ugleh!\r\n\r\n", reader.Value);
+ Assert.AreEqual("#C16------------------------------\r\n#C12Ingredients #C20\r\n#C16------------------------------\r\n\r\na piece of Leather Armor\r\n( ie #L \"Enhanced Leather Armor Boots\" \"85644\" )\r\n\r\n\r\n#L \"Hacker Tool\" \"87814\"\r\n\r\n\r\n#L \"Clanalizer\" \"208313\"\r\n\r\n\r\n#C16------------------------------\r\n#C12Recipe #C16\r\n#C16------------------------------#C20\r\n\r\nHacker Tool\r\n#C15+#C20\r\na piece of Leather Armor\r\n#C15=#C20\r\n\r\na piece of Hacked Leather Armor\r\n( ie : #L \"Hacked Leather Armor Boots\" \"245979\" )\r\n#C16Skills: | BE |#C20\r\n\r\n#C14------------------------------#C20\r\n\r\nClanalizer\r\n#C15+#C20\r\na piece of Hacked Leather Armor\r\n#C15=#C20\r\n\r\na piece of Apocalypse Leather Armor\r\n( ie : #L \"Apocalypse Leather Armor Boots\" \"245966\" )\r\n#C16Skills: | ?? |#C20\r\n\r\n#C16------------------------------\r\n#C12Details#C16\r\n#C16------------------------------#C20\r\n\r\n#L \"Apocalypse Leather Armor Boots\" \"245967\"\r\n#L \"Apocalypse Leather Armor Gloves\" \"245969\"\r\n#L \"Apocalypse Leather Armor Helmet\" \"245975\"\r\n#L \"Apocalypse Leather Armor Pants\" \"245971\"\r\n#L \"Apocalypse Leather Armor Sleeves\" \"245973\"\r\n#L \"Apocalypse Leather Body Armor\" \"245965\"\r\n\r\n#C16------------------------------\r\n#C12Comments#C16\r\n#C16------------------------------#C20\r\n\r\nNice froob armor.. but ugleh!\r\n\r\n", reader.Value);
}
[Test]
@@ -791,12 +791,12 @@ third line", jsonTextReader.Value);
[Test]
public void NullTextReader()
{
- ExceptionAssert.Throws (
- () => { new JsonTextReader (null); },
- new string[] {
- "Value cannot be null." + Environment.NewLine + "Parameter name: reader",
- "Argument cannot be null." + Environment.NewLine + "Parameter name: reader" // Mono
- });
+ ExceptionAssert.Throws (
+ () => { new JsonTextReader (null); },
+ new string[] {
+ "Value cannot be null." + Environment.NewLine + "Parameter name: reader",
+ "Argument cannot be null." + Environment.NewLine + "Parameter name: reader" // Mono
+ });
}
[Test]
diff --git a/Src/Newtonsoft.Json.Tests/Serialization/ImmutableCollectionsTests.cs b/Src/Newtonsoft.Json.Tests/Serialization/ImmutableCollectionsTests.cs
index 588cb515..10894a63 100644
--- a/Src/Newtonsoft.Json.Tests/Serialization/ImmutableCollectionsTests.cs
+++ b/Src/Newtonsoft.Json.Tests/Serialization/ImmutableCollectionsTests.cs
@@ -142,11 +142,11 @@ namespace Newtonsoft.Json.Tests.Serialization
public void SerializeDefaultArray()
{
ExceptionAssert.Throws(
- () => JsonConvert.SerializeObject(default(ImmutableArray), Formatting.Indented),
- new [] {
- "Object reference not set to an instance of an object.",
- "Object reference not set to an instance of an object" // mono
- });
+ () => JsonConvert.SerializeObject(default(ImmutableArray), Formatting.Indented),
+ new [] {
+ "Object reference not set to an instance of an object.",
+ "Object reference not set to an instance of an object" // mono
+ });
}
#endregion
diff --git a/Src/Newtonsoft.Json.Tests/Serialization/JsonSerializerTest.cs b/Src/Newtonsoft.Json.Tests/Serialization/JsonSerializerTest.cs
index f9365179..92ff3a5c 100644
--- a/Src/Newtonsoft.Json.Tests/Serialization/JsonSerializerTest.cs
+++ b/Src/Newtonsoft.Json.Tests/Serialization/JsonSerializerTest.cs
@@ -2975,11 +2975,11 @@ Path '', line 1, position 1.",
string json = @"[]";
ExceptionAssert.Throws(
- () => { JsonConvert.DeserializeObject(json); },
- new [] {
- "Unable to cast object of type 'Newtonsoft.Json.Linq.JArray' to type 'Newtonsoft.Json.Linq.JObject'.",
- "Cannot cast from source type to destination type." // mono
- });
+ () => { JsonConvert.DeserializeObject(json); },
+ new [] {
+ "Unable to cast object of type 'Newtonsoft.Json.Linq.JArray' to type 'Newtonsoft.Json.Linq.JObject'.",
+ "Cannot cast from source type to destination type." // mono
+ });
}
[Test]
@@ -6307,22 +6307,22 @@ To fix this error either change the environment to be fully trusted, change the
public void DeserializeDoubleFromNullString()
{
ExceptionAssert.Throws(
- () => { JsonConvert.DeserializeObject(null); },
- new [] {
- "Value cannot be null." + Environment.NewLine + "Parameter name: value",
- "Argument cannot be null." + Environment.NewLine + "Parameter name: value" // mono
- });
+ () => { JsonConvert.DeserializeObject(null); },
+ new [] {
+ "Value cannot be null." + Environment.NewLine + "Parameter name: value",
+ "Argument cannot be null." + Environment.NewLine + "Parameter name: value" // mono
+ });
}
[Test]
public void DeserializeFromNullString()
{
ExceptionAssert.Throws(
- () => { JsonConvert.DeserializeObject(null); },
- new [] {
- "Value cannot be null." + Environment.NewLine + "Parameter name: value",
- "Argument cannot be null." + Environment.NewLine + "Parameter name: value" // mono
- });
+ () => { JsonConvert.DeserializeObject(null); },
+ new [] {
+ "Value cannot be null." + Environment.NewLine + "Parameter name: value",
+ "Argument cannot be null." + Environment.NewLine + "Parameter name: value" // mono
+ });
}
[Test]
diff --git a/Src/Newtonsoft.Json.Tests/Serialization/SerializationErrorHandlingTests.cs b/Src/Newtonsoft.Json.Tests/Serialization/SerializationErrorHandlingTests.cs
index 70306dd5..3269efe0 100644
--- a/Src/Newtonsoft.Json.Tests/Serialization/SerializationErrorHandlingTests.cs
+++ b/Src/Newtonsoft.Json.Tests/Serialization/SerializationErrorHandlingTests.cs
@@ -66,14 +66,14 @@ namespace Newtonsoft.Json.Tests.Serialization
}
]";
- var possibleMsgs = new [] {
- "[1] - Error message for member 1 = An item with the same key has already been added.",
- "[1] - Error message for member 1 = An element with the same key already exists in the dictionary." // mono
- };
+ var possibleMsgs = new [] {
+ "[1] - Error message for member 1 = An item with the same key has already been added.",
+ "[1] - Error message for member 1 = An element with the same key already exists in the dictionary." // mono
+ };
VersionKeyedCollection c = JsonConvert.DeserializeObject(json);
Assert.AreEqual(1, c.Count);
Assert.AreEqual(1, c.Messages.Count);
- Assert.IsTrue (possibleMsgs.Any (m => m == c.Messages[0]), "Expected One of: " + Environment.NewLine + string.Join (Environment.NewLine, possibleMsgs) + Environment.NewLine + "Was: " + Environment.NewLine + c.Messages[0]);
+ Assert.IsTrue (possibleMsgs.Any (m => m == c.Messages[0]), "Expected One of: " + Environment.NewLine + string.Join (Environment.NewLine, possibleMsgs) + Environment.NewLine + "Was: " + Environment.NewLine + c.Messages[0]);
}
[Test]
@@ -306,13 +306,13 @@ namespace Newtonsoft.Json.Tests.Serialization
Assert.AreEqual(3, errors.Count);
#if !(NET20 || NET35)
- var possibleErrs = new [] {
- "[1] - 1 - The string was not recognized as a valid DateTime. There is an unknown word starting at index 0.",
- "[1] - 1 - String was not recognized as a valid DateTime."
- };
+ var possibleErrs = new [] {
+ "[1] - 1 - The string was not recognized as a valid DateTime. There is an unknown word starting at index 0.",
+ "[1] - 1 - String was not recognized as a valid DateTime."
+ };
- Assert.IsTrue(possibleErrs.Any (m => m == errors[0]),
- "Expected One of: " + string.Join (Environment.NewLine, possibleErrs) + Environment.NewLine + "But was: " + errors[0]);
+ Assert.IsTrue(possibleErrs.Any (m => m == errors[0]),
+ "Expected One of: " + string.Join (Environment.NewLine, possibleErrs) + Environment.NewLine + "But was: " + errors[0]);
#else
Assert.AreEqual("[1] - 1 - The string was not recognized as a valid DateTime. There is a unknown word starting at index 0.", errors[0]);
#endif
diff --git a/Src/Newtonsoft.Json.Tests/TestFixtureBase.cs b/Src/Newtonsoft.Json.Tests/TestFixtureBase.cs
index e5a520ec..5717f195 100644
--- a/Src/Newtonsoft.Json.Tests/TestFixtureBase.cs
+++ b/Src/Newtonsoft.Json.Tests/TestFixtureBase.cs
@@ -194,23 +194,23 @@ namespace Newtonsoft.Json.Tests
}
}
- public static void Throws(Action action, params string[] possibleMessages)
- where TException : Exception
- {
- try
- {
- action();
+ public static void Throws(Action action, params string[] possibleMessages)
+ where TException : Exception
+ {
+ try
+ {
+ action();
- Assert.Fail("Exception of type {0} expected; got none exception", typeof(TException).Name);
- }
- catch (TException ex)
- {
- Assert.Contains (ex.Message, possibleMessages, "Unexpected exception message." + Environment.NewLine + "Expected One of: " + string.Join (Environment.NewLine, possibleMessages) + Environment.NewLine + "Got: " + ex.Message + Environment.NewLine + Environment.NewLine + ex);
- }
- catch (Exception ex)
- {
- throw new Exception(string.Format("Exception of type {0} expected; got exception of type {1}.", typeof(TException).Name, ex.GetType().Name), ex);
- }
- }
+ Assert.Fail("Exception of type {0} expected; got none exception", typeof(TException).Name);
+ }
+ catch (TException ex)
+ {
+ Assert.Contains (ex.Message, possibleMessages, "Unexpected exception message." + Environment.NewLine + "Expected One of: " + string.Join (Environment.NewLine, possibleMessages) + Environment.NewLine + "Got: " + ex.Message + Environment.NewLine + Environment.NewLine + ex);
+ }
+ catch (Exception ex)
+ {
+ throw new Exception(string.Format("Exception of type {0} expected; got exception of type {1}.", typeof(TException).Name, ex.GetType().Name), ex);
+ }
+ }
}
}
\ No newline at end of file
diff --git a/Src/Newtonsoft.Json.Tests/Utilities/ExpressionReflectionDelegateFactoryTests.cs b/Src/Newtonsoft.Json.Tests/Utilities/ExpressionReflectionDelegateFactoryTests.cs
index 9775c32c..967cefad 100644
--- a/Src/Newtonsoft.Json.Tests/Utilities/ExpressionReflectionDelegateFactoryTests.cs
+++ b/Src/Newtonsoft.Json.Tests/Utilities/ExpressionReflectionDelegateFactoryTests.cs
@@ -112,10 +112,10 @@ namespace Newtonsoft.Json.Tests.Utilities
Func