public void Given() { customers = new List<Customer> { new Customer { Id = 1, FirstName = "Mike", LastName = "McCarthy" }, new Customer { Id = 2, FirstName = "Joe", LastName = "Schmoe" } }; var sut = new CsvBuilder<Customer>(); result = sut.BuildCsvFromListOf(customers, true); }
public void Given() { var list = new List<AClassWithAllValueTypesAsProperties> { new AClassWithAllValueTypesAsProperties { Object = anObject, Bool = true, BookStruct = new BookStruct { Author = "BookStruct author", Price = 100, Title = "BookStruct title" }, Byte = new byte(), Char = new char(), DateTime = dateTimeNow, Decimal = 1, Double = 2d, BookType = BookType.Fiction, Float = 3, Guid = guid, Int = 4, Long = 5, Sbyte = new sbyte(), Short = 6, UInt = 7, Ulong = 8, Ushort = 9, String = "string", NestedNestedClass = new NestedNestedClass { NestedNestedClassProperty = "PropertyValueForNestedNestedClassProperty" } } }; var sut = new CsvBuilder<AClassWithAllValueTypesAsProperties>(); result = sut.BuildCsvFromListOf(list, true); }
public void Given() { var sut = new CsvBuilder<AClass>(); var classes = new List<AClass> { new AClass { AClassProperty = "AClassProperty", NestedClass = new NestedClass { NestedClassProperty = "NestedClassProperty", NestedNestedClass = new NestedNestedClass { NestedNestedClassProperty = "NestedNestedClassProperty" } } } }; result = sut.BuildCsvFromListOf(classes, true); }