public void ReturnTrue_WhenEntityStateIsDleted()
        {
            // Arrange.
            DbContextMock dbContext = new DbContextMock();
            PersonDataEntityMock entity = new PersonDataEntityMock();
            dbContext.Entry(entity).State = EntityState.Deleted;

            // Act.
            bool result = dbContext.IsAttached(entity);

            // Assert.
            Assert.IsTrue(result);
        }
        public void RunInExpectedTime()
        {
            // Arrange.
            DbContextMock dbContext = new DbContextMock();
            PersonDataEntityMock entity = new PersonDataEntityMock();
            dbContext.Entry(entity).State = EntityState.Detached;

            // Act & Assert.
            Ensure.ActionRunsInExpectedTime(
                () =>
                {
                    dbContext.IsAttached(entity);
                },
                ExecutionTimeType.Normal);
        }