Skip to content

Commit

Permalink
Test ReportDevice client call
Browse files Browse the repository at this point in the history
  • Loading branch information
magnus-tretton37 committed Mar 27, 2019
1 parent 7d8002a commit d6d7aa3
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/Tests/When_calling_client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,27 @@ public void Should_throw_exception_if_calling_approve_device_with_null_token(Cas
act.Should().Throw<ArgumentException>();
}

[Theory, AutoFakeData(typeof(CastleConfigurationNoTrackCustomization))]
public void Should_report_device(string deviceToken, CastleClient sut)
{
Func<Task> act = async () => await sut.ReportDevice(deviceToken);
act.Should().NotThrow();
}

[Theory, AutoFakeData(typeof(CastleConfigurationNoTrackCustomization))]
public void Should_throw_exception_if_calling_report_device_with_empty_token(CastleClient sut)
{
Func<Task> act = async () => await sut.ReportDevice("");
act.Should().Throw<ArgumentException>();
}

[Theory, AutoFakeData(typeof(CastleConfigurationNoTrackCustomization))]
public void Should_throw_exception_if_calling_report_device_with_null_token(CastleClient sut)
{
Func<Task> act = async () => await sut.ReportDevice(null);
act.Should().Throw<ArgumentException>();
}

[Theory, AutoFakeData(typeof(CastleConfigurationNoTrackCustomization))]
public void Should_start_impersonation(ImpersonateStartRequest request, CastleClient sut)
{
Expand Down

0 comments on commit d6d7aa3

Please sign in to comment.