public void WhenItIsDeserializedIntoAnInstanceOfNullableTypeTester() { var bindingContext = new BindingContextForTests(typeof(List<NullableTypeTester>), typeof(NullableTypeTester)); var deserializer = new CsvDeserializer(); var instance = (List<NullableTypeTester>)deserializer.Deserialize("application/csv", _stream, bindingContext); _nullableTypeTesters = instance; _stream.Dispose(); }
public void WhenItIsDeserializedIntoAnInstanceOfPerson() { var bindingContext = new BindingContextForTests(typeof(Person), null); var deserializer = new CsvDeserializer(); var people = (Person)deserializer.Deserialize("application/csv", _stream, bindingContext); _people = new List<Person>() {people}; _stream.Dispose(); }
public void WhenItIsDeserializedIntoADynamicDictionaryList() { var bindingContext = new BindingContextForTests(typeof(List<DynamicDictionary>), typeof(DynamicDictionary)); var deserializer = new CsvDeserializer(); var instance = (List<DynamicDictionary>)deserializer.Deserialize("application/csv", _stream, bindingContext); _dynamicDictionaries = instance; _stream.Dispose(); }
public void WhenItIsDeserializedIntoAnArray() { var bindingContext = new BindingContextForTests(typeof(Person[]), typeof(Person)); var deserializer = new CsvDeserializer(); var people = (Person[])deserializer.Deserialize("application/csv", _stream, bindingContext); _people = people; _stream.Dispose(); }