mirror of
https://github.com/azaion/admin.git
synced 2026-04-22 11:56:32 +00:00
27 lines
1.1 KiB
C#
27 lines
1.1 KiB
C#
using Azaion.Common.Configs;
|
|
using Azaion.Common.Database;
|
|
using Azaion.Services;
|
|
using Microsoft.Extensions.Options;
|
|
using Xunit;
|
|
|
|
namespace Azaion.Test;
|
|
|
|
public class UserServiceTest
|
|
{
|
|
[Fact]
|
|
public async Task CheckHardwareHashTest()
|
|
{
|
|
var dbFactory = new DbFactory(new OptionsWrapper<ConnectionStrings>(new ConnectionStrings
|
|
{
|
|
AzaionDb = "Host=188.245.120.247;Port=4312;Database=azaion;Username=azaion_reader;Password=A@1n_zxre@d!only@$Az",
|
|
AzaionDbAdmin = "Host=188.245.120.247;Port=4312;Database=azaion;Username=azaion_admin;Password=Az@1on_Oddmin$$@r"
|
|
}));
|
|
var userService = new UserService(dbFactory, new MemoryCache());
|
|
var user = await userService.GetByEmail("spielberg@azaion.com");
|
|
if (user == null)
|
|
throw new Exception("User not found");
|
|
|
|
var res = await userService.CheckHardwareHash(user,
|
|
"CPU: AMD Ryzen 9 3900XT 12-Core Processor. GPU: Microsoft Remote Display Adapter. Memory: 67037080. DriveSerial: PHMB746301G6480DGN _00000001.");
|
|
}
|
|
} |