Skip to content

Commit

Permalink
AddEntryToCardDiscussion: add minor unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
VoltanFr committed Mar 2, 2024
1 parent 4ed0517 commit f0a4572
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions MemCheck.ApplicationTests/Cards/AddEntryToCardDiscussionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,17 @@ public async Task UserDoesNotExist()
await Assert.ThrowsExceptionAsync<NonexistentUserException>(async () => await new AddEntryToCardDiscussion(dbContext.AsCallContext()).RunAsync(new AddEntryToCardDiscussion.Request(RandomHelper.Guid(), cardId, RandomHelper.String())));
}
[TestMethod()]
public async Task UserUnregistered()
{
var db = DbHelper.GetEmptyTestDB();
var userId = await UserHelper.CreateInDbAsync(db);
var cardId = await CardHelper.CreateIdAsync(db, userId);
await UserHelper.DeleteAsync(db, userId);

using var dbContext = new MemCheckDbContext(db);
await Assert.ThrowsExceptionAsync<NonexistentUserException>(async () => await new AddEntryToCardDiscussion(dbContext.AsCallContext()).RunAsync(new AddEntryToCardDiscussion.Request(RandomHelper.Guid(), cardId, RandomHelper.String())));
}
[TestMethod()]
public async Task CardDoesNotExist()
{
var db = DbHelper.GetEmptyTestDB();
Expand Down
2 changes: 1 addition & 1 deletion MemCheck.WebUI/MemCheck.WebUI.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<VersionPrefix>0.186.2</VersionPrefix>
<VersionPrefix>0.186.3</VersionPrefix>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit f0a4572

Please sign in to comment.