public CsvLogger(string filename, Func <string> GetUserName = null) { csvFile = new CsvOf <LogEntry>(filename); if (GetUserName == null) { this.GetUserName = () => string.Empty; } else { this.GetUserName = GetUserName; } }
public async Task TestAsync() { CsvOf <MyModelExemple> sut = createSut(); await sut.WriteAsync( new MyModelExemple { NullableBool = true } ); var result = await sut.ReadAsync(); Assert.AreEqual(1, result.Count()); Assert.AreEqual(true, result.First().NullableBool); sut.Clear(); }