chore: init commit from GitHub
Some checks are pending
Deploy / update (push) Waiting to run
Build Project .NET / build (push) Waiting to run

This commit is contained in:
Lisoveliy
2025-05-12 19:44:33 +03:00
parent 11a3f40596
commit aebe654c38
107 changed files with 18953 additions and 403 deletions

View File

@@ -0,0 +1,26 @@
using FluentAssertions;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Options;
using SWAD.API.Models.Config.ApiServices;
using SWAD.API.Services.MusicAPI.Auth;
namespace ApiTest.MusicApi;
public class Spotify
{
[Test]
public async Task SpotifyAuthTest()
{
var confbuilder = new ConfigurationBuilder().SetBasePath(Environment.CurrentDirectory)
.AddJsonFile("appsettings.json")
.Build().GetSection(ApiServicesConfig.ConfigName);
//throw new Exception(Environment.CurrentDirectory);
IOptions<ApiServicesConfig> config = new OptionsWrapper<ApiServicesConfig>(confbuilder.Get<ApiServicesConfig>());
var authService = new SpotifyAuthService(config);
var authResponse = await authService.GetToken();
authResponse.Should()
.NotBeNull();
authResponse.Token.Should()
.NotBeNull();
}
}