public void GivenIHaveSuppliedAComplexObjectConsistingOfPropertiesAnArrayAndAComplexArray() {
     _complexObject = new ComplexObject {
         Name = "Complex Object",
         Description = "A complex object",
         ComplexArrayObjects = new List<ComplexArrayObject> {
             new ComplexArrayObject {
                 Name = "Array Object #1",
                 Description = "The 1st array object"
             },
             new ComplexArrayObject {
                 Name = "Array Object #2",
                 Description = "The 2nd array object"
             }
         },
         Doubles = new List<double> {
             1d, 2.5d, 10.8d
         }
     };
 }
 public void GivenIInstantiatedAComplexObject() {
     _complexObject = new ComplexObject {
         Name = "Complex Object",
         Description = "A complex object",
         ComplexArrayObjects = new List<ComplexArrayObject> {
             new ComplexArrayObject {
                 Name = "Array Object #1",
                 Description = "The 1st array object"
             },
             new ComplexArrayObject {
                 Name = "Array Object #2",
                 Description = "The 2nd array object"
             }
         },
         Doubles = new List<double> {
             1d, 2.5d, 10.8d
         }
     };
 }
 public void WhenIDeserialiseTheComplexObject() {
     _deserialisedComplexObject = Json.Deserialise(
         new ComplexObjectDeserialiser(new StandardJsonNameValueCollection(_serialisedObject)), true);
 }
Ejemplo n.º 4
0
 public void WhenIDeserialiseTheComplexObject()
 {
     _deserialisedComplexObject = Json.Deserialise(
         new ComplexObjectDeserialiser(new StandardJsonNameValueCollection(_serialisedObject)), true);
 }