public async Task UpdateAsync_Should_Set_the_Entity_State_as_Modified_Test()
            {
                // Arrange

                // // Create Mocked Context by Seeding Data
                await using var context = new DataContext(Options);

                await MockHelpers.CreateMockedDataContext(Options);

                RepositoryUnderTest = new IssueRepository(context);

                // Act

                RepositoryUnderTest.UpdateIssue(IssueList[0]);

                // Assert

                var result = context.ChangeTracker.Entries();

                result.First().State.Should().Be(EntityState.Modified);
            }
Beispiel #2
0
 public async Task <ActionResult <ClientIssue> > UpdateIssue(ClientIssue updated)
 {
     return(await ir.UpdateIssue(HttpContext.Items["UserID"].ToString(), updated));
 }