diff --git a/Nhl.Api.Tests/LeagueTests.cs b/Nhl.Api.Tests/LeagueTests.cs index 9237fff0..0e5666d6 100644 --- a/Nhl.Api.Tests/LeagueTests.cs +++ b/Nhl.Api.Tests/LeagueTests.cs @@ -3,15 +3,12 @@ using Nhl.Api.Models.Enumerations.Player; using Nhl.Api.Models.Enumerations.Team; using Nhl.Api.Models.Season; -using Nhl.Api.Models.Standing; using Nhl.Api.Models.Team; using Nhl.Api.Tests.Helpers.Attributes; using System; using System.Collections.Generic; using System.Linq; -using System.Net; using System.Threading.Tasks; -using static System.Runtime.InteropServices.JavaScript.JSType; namespace Nhl.Api.Tests; @@ -159,7 +156,7 @@ public async Task GetTeamScheduleBySeasonAsync_Returns_Not_Null_With_Valid_Infor Assert.IsNotNull(game.PeriodDescriptor); Assert.IsNotNull(game.EasternUTCOffset); Assert.IsNotNull(game.VenueTimezone); - Assert.IsNotNull(game.GameType); + Assert.IsNotNull(game.GameType); Assert.IsNotNull(game.GameState); } } @@ -236,7 +233,7 @@ public async Task GetTeamWeekScheduleByDateTimeOffsetAsync_Returns_Not_Null_With } [TestMethodWithRetry(RetryCount = 5)] - [DataRow("2023-12-01")] + [DataRow("2023-12-01")] [DataRow("2022-10-14")] [DataRow("2013-11-15")] [DataRow("2002-10-16")] @@ -263,7 +260,7 @@ public async Task GetLeagueStandingsByDateTimeOffsetAsync_Get_League_Information } [TestMethodWithRetry(RetryCount = 5)] - public async Task GetLeagueStandingsSeasonInformationAsync_Get_Information_Is_Valid() + public async Task GetLeagueStandingsSeasonInformationAsync_Get_Information_Is_Valid() { // Arrange await using INhlApi nhlApi = new NhlApi(); @@ -534,7 +531,7 @@ public async Task GetLeagueWeekScheduleByDateTimeAsync_Return_Valid_Information_ var result = await nhlApi.GetLeagueWeekScheduleByDateTimeAsync(DateTimeOffset.Parse(date)); // Assert - Assert.IsNotNull(result); + Assert.IsNotNull(result); } [TestMethodWithRetry(RetryCount = 5)] @@ -576,7 +573,7 @@ public async Task GetGameScoresByDateTimeAsync_Valid_Information_With_Date(strin } [TestMethodWithRetry(RetryCount = 5)] - public async Task GetLeagueMetadataInformation_Returns_Valid_Information_Both_Players_Teams() + public async Task GetLeagueMetadataInformation_Returns_Valid_Information_Both_Players_Teams() { // Arrange await using INhlApi nhlApi = new NhlApi(); @@ -599,7 +596,7 @@ public async Task GetLeagueMetadataInformation_Returns_Valid_Information_Just_Te await using INhlApi nhlApi = new NhlApi(); // Act - var teams = new List { "EDM","TOR" }; + var teams = new List { "EDM", "TOR" }; var result = await nhlApi.GetLeagueMetadataInformation(null, teams); // Assert diff --git a/Nhl.Api.Tests/PlayerTests.cs b/Nhl.Api.Tests/PlayerTests.cs index 2fe5a4e5..8a80315a 100644 --- a/Nhl.Api.Tests/PlayerTests.cs +++ b/Nhl.Api.Tests/PlayerTests.cs @@ -1,8 +1,6 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Nhl.Api.Enumerations.Game; using Nhl.Api.Models.Enumerations.Player; -using Nhl.Api.Models.Game; -using Nhl.Api.Models.Player; using Nhl.Api.Models.Season; using Nhl.Api.Tests.Helpers.Attributes; using System.Linq; @@ -169,7 +167,7 @@ public async Task GetPlayerSeasonGameLogsBySeasonAndGameTypeAsync_Test_Player_En Assert.IsNotNull(playerSeasonGameLog); Assert.IsNotNull(playerSeasonGameLog.PlayerGameLogs); Assert.IsTrue(playerSeasonGameLog.PlayerGameLogs.Count > 0); - + foreach (var stat in playerSeasonGameLog.PlayerStatsSeasons) { Assert.IsNotNull(stat.Season); @@ -630,7 +628,7 @@ public async Task GetLiveGameFeedPlayerShiftsAsync_Test_Get_Player_Information() // Assert Assert.IsNotNull(playerShifts); Assert.AreEqual(790, playerShifts.PlayerShifts.Count); - + var firstShift = playerShifts.PlayerShifts.OrderBy(ps => ps.EventNumber).First(); Assert.AreEqual(8475883, firstShift.PlayerId); Assert.AreEqual(1, firstShift.ShiftNumber); @@ -670,9 +668,9 @@ public async Task GetPlayerSpotlightAsync_Test_Get_Player_Spotlights_When_Season // Act var playerSpotlight = await nhlApi.GetPlayerSpotlightAsync(); - + var isLeagueActive = await nhlApi.IsLeagueActiveAsync(); - if (isLeagueActive) + if (isLeagueActive) { // Assert Assert.IsTrue(playerSpotlight.Count > 0); diff --git a/Nhl.Api.Tests/StatisticsTests.cs b/Nhl.Api.Tests/StatisticsTests.cs index ac12b09f..a06d7305 100644 --- a/Nhl.Api.Tests/StatisticsTests.cs +++ b/Nhl.Api.Tests/StatisticsTests.cs @@ -1,7 +1,6 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Nhl.Api.Enumerations.Game; using Nhl.Api.Enumerations.Statistic; -using Nhl.Api.Models.Game; using Nhl.Api.Models.Season; using Nhl.Api.Tests.Helpers.Attributes; using System.Linq; @@ -86,7 +85,7 @@ public async Task GetSkaterStatsisticsLeadersAsync_Returns_Valid_Information(Pla [DataRow(GoalieStatisticsType.GoalsAgainstAverage, GameType.RegularSeason, SeasonYear.season20222023, 10)] [DataRow(GoalieStatisticsType.SavePercentage, GameType.RegularSeason, SeasonYear.season20222023, 10)] [DataRow(GoalieStatisticsType.Shutouts, GameType.RegularSeason, SeasonYear.season20222023, 10)] - [DataRow(GoalieStatisticsType.Wins, GameType.RegularSeason, SeasonYear.season20222023, 10)] + [DataRow(GoalieStatisticsType.Wins, GameType.RegularSeason, SeasonYear.season20222023, 10)] public async Task GetGoalieStatsisticsLeadersAsync_Returns_Valid_Information(GoalieStatisticsType goalieStatisticsType, GameType gameType, string seasonYear, int limit) { // Arrange @@ -122,7 +121,7 @@ public async Task GetGoalieStatsisticsLeadersAsync_Returns_Valid_Information(Goa break; default: break; - + } } } diff --git a/Nhl.Api.Tests/TeamTests.cs b/Nhl.Api.Tests/TeamTests.cs index 0f307e4d..30d62e6f 100644 --- a/Nhl.Api.Tests/TeamTests.cs +++ b/Nhl.Api.Tests/TeamTests.cs @@ -178,7 +178,7 @@ public async Task TestGetTeamLogoDarkAsIntAsync(int teamId) [DataRow(24)] [DataRow(25)] [TestMethodWithRetry(RetryCount = 5)] - public async Task GetCurrentTeamScoreboardAsync_Get_Valid_Information_With_Id(int teamId) + public async Task GetCurrentTeamScoreboardAsync_Get_Valid_Information_With_Id(int teamId) { // Arrange await using INhlApi nhlApi = new NhlApi(); @@ -213,7 +213,7 @@ public async Task GetCurrentTeamScoreboardAsync_Get_Valid_Information_With_Enum( [DataRow(TeamEnum.BostonBruins, SeasonYear.season20132014)] [DataRow(TeamEnum.VegasGoldenKnights, SeasonYear.season20222023)] [DataRow(TeamEnum.TorontoMapleLeafs, SeasonYear.season19661967)] - [DataRow(TeamEnum.SeattleKraken,SeasonYear.season20232024)] + [DataRow(TeamEnum.SeattleKraken, SeasonYear.season20232024)] [TestMethodWithRetry(RetryCount = 5)] public async Task GetCurrentTeamScoreboardAsync_Get_Valid_Information_With_Enum(TeamEnum team, string seasonYear) { @@ -354,7 +354,7 @@ public async Task GetTeamSeasonScheduleBySeasonYearAsync_Get_Valid_Information_W Assert.IsNotNull(teamRoster); Assert.IsNotNull(teamRoster.Games); Assert.IsTrue(teamRoster.Games.Count > 0); - + } diff --git a/Nhl.Api/Src/Api/NhlApi.cs b/Nhl.Api/Src/Api/NhlApi.cs index 985d1918..18021e79 100644 --- a/Nhl.Api/Src/Api/NhlApi.cs +++ b/Nhl.Api/Src/Api/NhlApi.cs @@ -500,7 +500,6 @@ public async Task GetTeamSeasonScheduleByYearAndMonthAsync(T return await _nhlGameApi.GetTeamSeasonScheduleByYearAndMonthAsync(team, month, year); } - /// /// Returns the NHL team schedule for the specified team and the specified date and time /// diff --git a/Nhl.Api/Src/LeagueApi/INhlLeagueApi.cs b/Nhl.Api/Src/LeagueApi/INhlLeagueApi.cs index 1368ef2c..4d7e51c6 100644 --- a/Nhl.Api/Src/LeagueApi/INhlLeagueApi.cs +++ b/Nhl.Api/Src/LeagueApi/INhlLeagueApi.cs @@ -190,7 +190,7 @@ public interface INhlLeagueApi /// A collection of NHL team identifiers, Example: [EDM, TOR] /// Returns the metadata information about the NHL league including players, teams and season states Task GetLeagueMetadataInformation(List players, List teams); - + /// /// Determines if the NHL league is active or inactive based on the current date and time /// diff --git a/Nhl.Api/Src/LeagueApi/NhlLeagueApi.cs b/Nhl.Api/Src/LeagueApi/NhlLeagueApi.cs index 94f28d1a..12e16264 100644 --- a/Nhl.Api/Src/LeagueApi/NhlLeagueApi.cs +++ b/Nhl.Api/Src/LeagueApi/NhlLeagueApi.cs @@ -9,7 +9,6 @@ using Nhl.Api.Models.Standing; using Nhl.Api.Models.Team; using Nhl.Api.Services; -using System; using System.Linq; using System.Text;