2023-11-17 20:18:16 +01:00
|
|
|
using Nyanlabs.Umogen.Core;
|
|
|
|
|
2023-11-17 21:34:02 +01:00
|
|
|
namespace Nyanlabs.Umogen.WebTests;
|
2023-11-17 20:18:16 +01:00
|
|
|
|
|
|
|
public class AuthTests
|
|
|
|
{
|
|
|
|
[Fact]
|
|
|
|
public async Task TestTokenVerification()
|
|
|
|
{
|
|
|
|
// Given
|
2023-11-17 21:34:02 +01:00
|
|
|
var rootDir = Environment.CurrentDirectory.Replace("test/Nyanlabs.Umogen.WebTests/bin/Debug/net8.0", "");
|
2023-11-17 20:18:16 +01:00
|
|
|
|
|
|
|
UmoEngine eng = new(Path.Combine(rootDir, Core.Umogen.DEFAULT_API_KEY_FILE));
|
|
|
|
|
|
|
|
// When
|
|
|
|
var result = await eng.ValidateKey();
|
|
|
|
|
|
|
|
// Then
|
|
|
|
Assert.True(result);
|
|
|
|
}
|
|
|
|
}
|