public async void WriteFile_HasOneUiRow() { var rows = await SeriesWriter.WriteSeries(_series); var uiRowCount = rows.Count(r => r.Name.Equals("ui")); Assert.Equal(1, uiRowCount); }
public async void WriteFile_ScoreCodeRowsHaveNoTrueId() { var rows = await SeriesWriter.WriteSeries(_series); var scrcodeRowsWithTrueId = rows.Count(r => r.Name.Equals("scrcode") && r.CompetitorOrScoringSystemId.HasValue); Assert.Equal(0, scrcodeRowsWithTrueId); }
public async void WriteFile_scrfollowchampIs1or0() { var rows = await SeriesWriter.WriteSeries(_series); var rowToCheck = rows.First(r => r.Name.Equals("scrfollowchamp")); Assert.True(rowToCheck.Value.Equals("1", StringComparison.InvariantCultureIgnoreCase) || rowToCheck.Value.Equals("0", StringComparison.InvariantCultureIgnoreCase)); }
public async void WriteFile_AllScoreRowsHaveSameScoringSystemId() { var rows = await SeriesWriter.WriteSeries(_series); Assert.Single(rows.Where(r => r.Name.StartsWith("scr") && r.CompetitorOrScoringSystemId.HasValue) .Select(r => r.CompetitorOrScoringSystemId) .Distinct()); }
public async void WriteFile_scrtiefinalsIsYesOrNo() { var rows = await SeriesWriter.WriteSeries(_series); var rowToCheck = rows.First(r => r.Name.Equals("scrtiefinals")); Assert.True(rowToCheck.Value.Equals("Yes", StringComparison.InvariantCultureIgnoreCase) || rowToCheck.Value.Equals("No", StringComparison.InvariantCultureIgnoreCase)); }
public async void WriteFile_HasTwoRaces() { var rows = await SeriesWriter.WriteSeries(_series); Assert.Equal(2, rows.Where(r => r.Name.StartsWith("race") && r.RaceId.HasValue) .Select(r => r.RaceId) .Distinct() .Count()); }
public async void WriteFile_HasCompetitorRowsWithTwoIds() { var rows = await SeriesWriter.WriteSeries(_series); Assert.Equal(2, rows.Where(r => r.Name.StartsWith("comp") && r.CompetitorOrScoringSystemId.HasValue) .Select(r => r.CompetitorOrScoringSystemId) .Distinct() .Count()); }
public async void WriteFile_HasScoreCodeRowsWithId() { var rows = await SeriesWriter.WriteSeries(_series); var scrcodeRow = rows.Count(r => r.Name.Equals("scrcode")); var scrcodeRowsWithId = rows.Count(r => r.Name.Equals("scrcode") && r.Value.Contains("|5|")); Assert.True(scrcodeRow > 2); Assert.Equal(scrcodeRow, scrcodeRowsWithId); }
public async void WriteFile_HasRaceResultRowsForAllCompetitorsInAllRaces() { var rows = await SeriesWriter.WriteSeries(_series); Assert.Equal(4, rows.Where(r => r.CompetitorOrScoringSystemId.HasValue && r.RaceId.HasValue) .Select(r => new { r.RaceId, r.CompetitorOrScoringSystemId }) .Distinct() .Count()); }
public async void WriteFile_HasScoreRows() { var rows = await SeriesWriter.WriteSeries(_series); Assert.True(rows.Count(r => r.Name.StartsWith("scr")) > 20); }
public async void WriteFile_GetsLotsOfDetails() { var rows = await SeriesWriter.WriteSeries(_series); Assert.True(rows.Count(r => r.Name.StartsWith("ser")) > 20); }
public async void BasicWriteFile() { var rows = await SeriesWriter.WriteSeries(_series); Assert.True(rows.Count() > 10); }
public async void WriteFile_HasLotsOfColumnRows() { var rows = await SeriesWriter.WriteSeries(_series); Assert.True(rows.Count(r => r.Name == "column") > 100); }