Skip to content

Commit

Permalink
Add additional test
Browse files Browse the repository at this point in the history
  • Loading branch information
willsawyerrrr committed Oct 7, 2024
1 parent d7e55f5 commit 6257946
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,20 @@ public async void GetLatestDatumWithDifferentDeviceRespondsWith404()
await deviceController.DeleteDevice(device.Id);
}

[Fact]
public async void GetLatestDatumWithNoDatumDeviceRespondsWith404()
{
var createResult = await deviceController.CreateDevice(Lorem.Sentence());
var createAction = Assert.IsType<CreatedAtActionResult>(createResult.Result);
var device = Assert.IsType<Device>(createAction.Value);

var getResult = healthcheckDataController.GetLatestHealthcheckDatumForDevice(Guid.NewGuid());

Assert.IsType<NotFoundResult>(getResult.Result);

await deviceController.DeleteDevice(device.Id);
}

[Fact]
public async void GetLatestDatumGetsOneDatum()
{
Expand Down

0 comments on commit 6257946

Please sign in to comment.