public void SimpleObjectTest() { JObject value = new JObject( new JProperty("GlossDiv", 1.234), new JProperty("title", "example glossary")); NewtonsoftInteropTests.VerifyNewtonsoftInterop <JObject>(value); }
public void AllPrimitivesObjectTest() { JObject value = new JObject( new JProperty("id", Guid.Parse("7029d079-4016-4436-b7da-36c0bae54ff6")), new JProperty("double", 0.18963001816981939), new JProperty("string", "XCPCFXPHHF"), new JProperty("boolean", true), new JProperty("null", null), //new JProperty("datetime", "2526-07-11T18:18:16.4520716"), datetime has issues. new JProperty("spatialPoint", new JObject( new JProperty("type", "Point"), new JProperty("coordinate", new double[] { 118.9897, -46.6781 }))), new JProperty("text", "tiger diamond newbrunswick snowleopard chocolate dog snowleopard turtle cat sapphire peach sapphire vancouver white chocolate horse diamond lion superlongcolourname ruby")); NewtonsoftInteropTests.VerifyNewtonsoftInterop <JObject>(value); }
public void FalseTest() { bool value = false; NewtonsoftInteropTests.VerifyNewtonsoftInterop <bool>(value); }
public void TrueTest() { bool value = true; NewtonsoftInteropTests.VerifyNewtonsoftInterop <bool>(value); }
public void ObjectWithAttributesTest() { ObjectWithAttributes objectWithAttributes = new ObjectWithAttributes("Brandon", 42, new DateTime(1995, 04, 16), Day.Tue); NewtonsoftInteropTests.VerifyNewtonsoftInterop <ObjectWithAttributes>(objectWithAttributes); }
public void StringTest() { string value = "Hello World"; NewtonsoftInteropTests.VerifyNewtonsoftInterop <string>(value); }
public void ObjectArrayTest() { object[] value = { new object(), new object() }; NewtonsoftInteropTests.VerifyNewtonsoftInterop <object[]>(value); }
public void DoubleTest() { double value = 1337.0; NewtonsoftInteropTests.VerifyNewtonsoftInterop <double>(value); }
public void BooleanArrayTest() { bool[] value = { true, false }; NewtonsoftInteropTests.VerifyNewtonsoftInterop <bool[]>(value); }
public void NullArrayTest() { object[] value = { null, null, null }; NewtonsoftInteropTests.VerifyNewtonsoftInterop <object[]>(value); }
public void NumberArrayTest() { double[] value = { 15, 22, 0.1 }; NewtonsoftInteropTests.VerifyNewtonsoftInterop <double[]>(value); }
public void IntArrayTest() { int[] value = { -2, -1, 0, 1, 2 }; NewtonsoftInteropTests.VerifyNewtonsoftInterop <int[]>(value); }
public void EmptyArrayTest() { object[] value = { }; NewtonsoftInteropTests.VerifyNewtonsoftInterop <object[]>(value); }
public void NullTest() { object value = null; NewtonsoftInteropTests.VerifyNewtonsoftInterop <object>(value); }
public void NestedArrayTest() { object[,] value = { { }, { } }; NewtonsoftInteropTests.VerifyNewtonsoftInterop <object[, ]>(value); }
public void IntegerTest() { int value = 1337; NewtonsoftInteropTests.VerifyNewtonsoftInterop <int>(value); }
public void EmptyObjectTest() { object value = new object(); NewtonsoftInteropTests.VerifyNewtonsoftInterop <object>(value); }
public void NegativeNumberTest() { double value = -1337.0; NewtonsoftInteropTests.VerifyNewtonsoftInterop <double>(value); }
public void EmptyStringTest() { string value = ""; NewtonsoftInteropTests.VerifyNewtonsoftInterop <string>(value); }