Skip to content

Commit 3bb8bff

Browse files
committed
- Update NuGet packages
- Update code format
1 parent deb5508 commit 3bb8bff

File tree

8 files changed

+65
-46
lines changed

8 files changed

+65
-46
lines changed
Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
32
<PropertyGroup>
43
<OutputType>Exe</OutputType>
5-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
65
</PropertyGroup>
7-
86
<ItemGroup>
9-
<PackageReference Include="Spectre.Console" Version="0.49.1" />
10-
<PackageReference Include="CSharpier.MsBuild" Version="0.29.2" PrivateAssets="all" />
7+
<PackageReference Include="Spectre.Console" Version="0.50.0" />
8+
<PackageReference Include="CSharpier.MsBuild" Version="1.0.2" PrivateAssets="all" />
119
</ItemGroup>
12-
1310
<ItemGroup>
1411
<ProjectReference Include="..\SoundCloudExplode\SoundCloudExplode.csproj" />
1512
</ItemGroup>
16-
17-
</Project>
13+
</Project>

SoundCloudExplode.Demo.Cli/Utils/PathEx.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ namespace SoundCloudExplode.Demo.Cli.Utils;
66

77
public static class PathEx
88
{
9-
private static readonly HashSet<char> InvalidFileNameChars =
10-
new(Path.GetInvalidFileNameChars());
9+
private static readonly HashSet<char> InvalidFileNameChars = new(
10+
Path.GetInvalidFileNameChars()
11+
);
1112

1213
public static string EscapeFileName(string path)
1314
{

SoundCloudExplode.Tests/SearchSpecs.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public async Task I_can_get_results_from_a_search_query(string query)
1818
var results = await soundcloud.Search.GetResultsAsync(query).CollectAsync(10);
1919

2020
// Assert
21-
results.Should().HaveCountGreaterOrEqualTo(10);
21+
results.Should().HaveCountGreaterThanOrEqualTo(10);
2222
}
2323

2424
[Theory]
@@ -32,7 +32,7 @@ public async Task I_can_get_track_results_from_a_search_query(string query)
3232
var videos = await soundcloud.Search.GetTracksAsync(query).CollectAsync(10);
3333

3434
// Assert
35-
videos.Should().HaveCountGreaterOrEqualTo(10);
35+
videos.Should().HaveCountGreaterThanOrEqualTo(10);
3636
}
3737

3838
[Theory]
Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,20 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
32
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
3+
<TargetFramework>net9.0</TargetFramework>
54
<IsTestProject>true</IsTestProject>
65
</PropertyGroup>
7-
86
<ItemGroup>
97
<Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
108
</ItemGroup>
11-
129
<ItemGroup>
13-
<PackageReference Include="coverlet.collector" Version="6.0.2" PrivateAssets="all" />
14-
<PackageReference Include="CSharpier.MsBuild" Version="0.29.2" PrivateAssets="all" />
15-
<PackageReference Include="FluentAssertions" Version="6.12.2" />
16-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
17-
<PackageReference Include="xunit" Version="2.9.2" />
18-
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" PrivateAssets="all" />
10+
<PackageReference Include="coverlet.collector" Version="6.0.4" PrivateAssets="all" />
11+
<PackageReference Include="CSharpier.MsBuild" Version="1.0.2" PrivateAssets="all" />
12+
<PackageReference Include="FluentAssertions" Version="8.3.0" />
13+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
14+
<PackageReference Include="xunit" Version="2.9.3" />
15+
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.1" PrivateAssets="all" />
1916
</ItemGroup>
20-
2117
<ItemGroup>
2218
<ProjectReference Include="..\SoundCloudExplode\SoundCloudExplode.csproj" />
2319
</ItemGroup>
24-
25-
</Project>
20+
</Project>

SoundCloudExplode.Tests/TrackSpecs.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,27 @@ public async Task I_can_get_the_metadata_of_any_available_track(string url)
1313
{
1414
// Arrange
1515
var soundcloud = new SoundCloudClient();
16+
await soundcloud.InitializeAsync();
1617

1718
// Act
1819
var results = await soundcloud.Tracks.GetAsync(url);
1920

2021
// Assert
2122
results.Should().NotBeNull();
2223
}
24+
25+
[Theory]
26+
[InlineData("https://soundcloud.com/purityy79/dororo-op-piano-sheet-in-description")]
27+
public async Task I_can_get_the_download_url_of_a_track(string url)
28+
{
29+
// Arrange
30+
var soundcloud = new SoundCloudClient();
31+
await soundcloud.InitializeAsync();
32+
33+
// Act
34+
var result = await soundcloud.Tracks.GetDownloadUrlAsync(url);
35+
36+
// Assert
37+
result.Should().NotBeNullOrEmpty();
38+
}
2339
}

SoundCloudExplode/Search/ISearchResult.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ namespace SoundCloudExplode.Search;
1616
/// </list>
1717
/// </p>
1818
/// </summary>
19-
2019
public interface ISearchResult : IBatchItem
2120
{
2221
/// <summary>
Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
32
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;netstandard2.1;netcoreapp3.1;net461;net8.0</TargetFrameworks>
3+
<TargetFrameworks>netstandard2.0;net9.0</TargetFrameworks>
54
<IsPackable>true</IsPackable>
6-
<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">true</IsTrimmable>
7-
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">true</IsAotCompatible>
5+
<IsTrimmable
6+
Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))"
7+
>true</IsTrimmable
8+
>
9+
<IsAotCompatible
10+
Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))"
11+
>true</IsAotCompatible
12+
>
813
</PropertyGroup>
9-
1014
<!-- NuGet -->
1115
<PropertyGroup>
1216
<Authors>$(Company)</Authors>
@@ -21,22 +25,31 @@
2125
<EmbedUntrackedSources>true</EmbedUntrackedSources>
2226
<DebugType>embedded</DebugType>
2327
</PropertyGroup>
24-
2528
<!-- Package additions -->
2629
<ItemGroup>
2730
<None Include="../favicon.png" Pack="true" PackagePath="" Visible="false" />
2831
</ItemGroup>
29-
3032
<ItemGroup>
31-
<PackageReference Include="CSharpier.MsBuild" Version="0.29.2" PrivateAssets="all" />
32-
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'net461'" />
33+
<PackageReference Include="CSharpier.MsBuild" Version="1.0.2" PrivateAssets="all" />
34+
<PackageReference
35+
Include="Microsoft.Bcl.AsyncInterfaces"
36+
Version="9.0.6"
37+
Condition="'$(TargetFramework)' == 'netstandard2.0'"
38+
/>
3339
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="all" />
34-
<PackageReference Include="PolyShim" Version="1.14.0" PrivateAssets="all" />
35-
<PackageReference Include="System.Text.Json" Version="8.0.5" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp' or '$(TargetFramework)' == 'netcoreapp3.1'" />
40+
<PackageReference Include="PolyShim" Version="1.15.0" PrivateAssets="all" />
41+
<PackageReference
42+
Include="System.Text.Json"
43+
Version="9.0.6"
44+
Condition="'$(TargetFramework)' == 'netstandard2.0'"
45+
/>
46+
<PackageReference
47+
Include="System.Threading.Tasks.Extensions"
48+
Version="4.6.3"
49+
Condition="'$(TargetFramework)' == 'netstandard2.0'"
50+
/>
3651
</ItemGroup>
37-
3852
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
3953
<Reference Include="System.Net.Http" />
4054
</ItemGroup>
41-
42-
</Project>
55+
</Project>

SoundCloudExplode/Utils/Http.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ namespace SoundCloudExplode.Utils;
55

66
internal static class Http
77
{
8-
private static readonly Lazy<HttpClient> HttpClientLazy =
9-
new(() =>
10-
{
11-
var handler = new HttpClientHandler();
8+
private static readonly Lazy<HttpClient> HttpClientLazy = new(() =>
9+
{
10+
var handler = new HttpClientHandler();
1211

13-
return new HttpClient(handler, true);
14-
});
12+
return new HttpClient(handler, true);
13+
});
1514

1615
public static HttpClient Client => HttpClientLazy.Value;
1716

0 commit comments

Comments
 (0)