add IsEmailAvailable method
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
|
||||
namespace UptimeSharp.Tests
|
||||
{
|
||||
public class AccountTest : TestsBase
|
||||
{
|
||||
public AccountTest() : base() { }
|
||||
|
||||
|
||||
[Fact]
|
||||
public async Task IsAvailabilityCheckWorking()
|
||||
{
|
||||
Assert.False(await client.IsEmailAvailable("cee@live.at"));
|
||||
Assert.True(await client.IsEmailAvailable(Guid.NewGuid().ToString() + "@live.at"));
|
||||
|
||||
await ThrowsAsync<ArgumentNullException>(async () =>
|
||||
{
|
||||
await client.IsEmailAvailable("");
|
||||
});
|
||||
|
||||
await ThrowsAsync<ArgumentNullException>(async () =>
|
||||
{
|
||||
await client.IsEmailAvailable("");
|
||||
});
|
||||
|
||||
await ThrowsAsync<ArgumentException>(async () =>
|
||||
{
|
||||
await client.IsEmailAvailable("opiu@opiuast");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -61,6 +61,7 @@
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AccountTest.cs" />
|
||||
<Compile Include="AlertsTest.cs" />
|
||||
<Compile Include="ClientTest.cs" />
|
||||
<Compile Include="MonitorsTest.cs" />
|
||||
|
||||
Reference in New Issue
Block a user