mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
36 lines
931 B
C#
36 lines
931 B
C#
using System.Threading.Tasks;
|
|
using Wabbajack.DTOs.Interventions;
|
|
using Wabbajack.Networking.Http.Interfaces;
|
|
using Xunit;
|
|
|
|
namespace Wabbajack.Networking.Steam.Test;
|
|
|
|
public class ClientTests
|
|
{
|
|
private readonly ITokenProvider<SteamLoginState> _token;
|
|
private readonly Client _steamClient;
|
|
private readonly IUserInterventionHandler _userInterventionHandler;
|
|
|
|
public ClientTests(ITokenProvider<SteamLoginState> token, Client client, IUserInterventionHandler userInterventionHandler)
|
|
{
|
|
_token = token;
|
|
_steamClient = client;
|
|
_userInterventionHandler = userInterventionHandler;
|
|
}
|
|
|
|
[Fact]
|
|
public async Task CanGetLogin()
|
|
{
|
|
var token = await _token.Get();
|
|
Assert.NotNull(token);
|
|
Assert.NotEmpty(token!.User);
|
|
}
|
|
|
|
[Fact]
|
|
public async Task CanLogin()
|
|
{
|
|
await _steamClient.Connect();
|
|
await _steamClient.Login();
|
|
|
|
}
|
|
} |