Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
        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));
        }