public async Task AuthTestWithoutLogin() { using var client = new CdnClient(Constants.BaseUrl); (bool success, string message) = await client.TestAuthentication(); Assert.IsFalse(success); Assert.IsNull(message); }
public async Task LoginAuthTest() { using var client = new CdnClient(Constants.BaseUrl); await client.Login("admin", "password"); (bool success, string message) = await client.TestAuthentication(); Assert.IsTrue(success); Assert.IsNotEmpty(message); }
public async Task GetApiKeyAndTestAuthentication() { using var client = new CdnClient(Constants.BaseUrl); await client.Login("admin", "password"); var tokenMaybe = await client.GetApiKey(); Assert.IsTrue(tokenMaybe.HasValue); Assert.IsNotEmpty(tokenMaybe.Value); (bool success, string message) = await client.TestAuthentication(); Assert.IsTrue(success); Assert.IsNotEmpty(message); }