public SailwaveFileReader(string fileName) { using (var reader = new StreamReader(fileName)) { Series = SeriesParser.GetSeries(reader); } }
public void SimpleFile_HasOneRaceColumns() { var series = SeriesParser.GetSeries(Utilities.SimpleFile.GetStream()); Assert.NotNull(series.Columns); Assert.True(series.Columns.Where(c => c.Type == ColumnType.Races).Count() == 1); }
public void SimpleFile_HasTwoRaces() { var series = SeriesParser.GetSeries(Utilities.SimpleFile.GetStream()); Assert.Equal(2, series.Races.Count); Assert.Equal(1, series.Races.Count(r => r.Id == 1)); }
public void SimpleFile_HasColumns() { var series = SeriesParser.GetSeries(Utilities.SimpleFile.GetStream()); Assert.NotNull(series.Columns); Assert.True(series.Columns.Count() > 200); }
public void SimpleFile_HasTwoCompetitors() { var series = SeriesParser.GetSeries(Utilities.SimpleFile.GetStream()); Assert.Equal(2, series.Competitors.Count); Assert.Equal(1, series.Competitors.Count(c => c.Id == 3)); }
private static SwObjects.Series ImportSWFile(string fileName) { using var reader = new StreamReader(fileName); return(SeriesParser.GetSeries(reader)); }
public static Series GetSeries(string filePath) { using var reader = new StreamReader(filePath); return(SeriesParser.GetSeries(reader)); }
public static Series GetSeries() { return(SeriesParser.GetSeries(SimpleFile.GetStream())); }
public void SimpleFile_ScoringSystemUiField() { var series = SeriesParser.GetSeries(Utilities.SimpleFile.GetStream()); Assert.NotNull(series.UserInterface); }
public void SimpleFile_ScoringSystemHas16Codes() { var series = SeriesParser.GetSeries(Utilities.SimpleFile.GetStream()); Assert.Equal(16, series.ScoringSystems[0].Codes.Count); }
public void SimpleFile_ScoringSystemHasNonZeroId() { var series = SeriesParser.GetSeries(Utilities.SimpleFile.GetStream()); Assert.NotEqual(0, series.ScoringSystems.FirstOrDefault()?.Id); }
public void SimpleFile_HasOneScoringSystem() { var series = SeriesParser.GetSeries(Utilities.SimpleFile.GetStream()); Assert.Single(series.ScoringSystems); }
public void SimpleFile_FirstRaceHasTwoResults() { var series = SeriesParser.GetSeries(Utilities.SimpleFile.GetStream()); Assert.Equal(2, series.Races[0].Results.Count()); }
public void BasicReadFile() { var series = SeriesParser.GetSeries(Utilities.SimpleFile.GetStream()); Assert.NotNull(series); }