private string AsCsvLine(Run run) { var e = new CsvLine { Distance = run.Distance.ToString(), Labels = LabelsToString(run.Labels), LastChanged = ConvertDateTime(run.LastChanged), RegisteredAt = ConvertDateTime(run.Start), Shoe = ShoeAsString(run.Shoe), Time = run.Time.ToString() }; return e.AsCsvLine(Separator); }
public void AssertAsCsvLine() { const char separator = '\t'; var e = new CsvLine { Distance = "Distance", Labels = "Labels", LastChanged = "LastChanged", RegisteredAt = "RegisteredAt", Shoe = "Shoe", Time = "Time" }; Assert.AreEqual("Time\tDistance\tShoe\tRegisteredAt\tLastChanged\tLabels", e.AsCsvLine(separator)); }