コード例 #1
0
            public async Task CreateAsync_Should_Set_the_Entity_State_as_Inserted_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.CreateIssue(IssueList[0]);

                // Assert

                var result = context.ChangeTracker.Entries();

                result.First().State.Should().Be(EntityState.Added);
            }