Trying to delete the file after performing my unit test failed. It failed because the file is still open used.

System.IO.IOException : The process cannot access the file because it is being used by another process.

Following is the code I used to reproduce the problem.
        [Fact]
        public void Open_close_with_Context()
        {

            Setup
            SQLiteConnection connection = RplvContextFactory.Instance.CreateConnection($"Data Source={_testFile}") as SQLiteConnection;
            RplvContext contextTest = new RplvContext(connection, true);
            contextTest.Database.Connection.Should().BeSameAs(connection);

            Action
            var result = contextTest.LuminaireDb.ToList();

            Verification
            contextTest.Database.Connection.State.Should().Be(ConnectionState.Closed);

            Action
            contextTest.Dispose();
            contextTest = null;

            Verification

            File.Exists(_testFile).Should().BeTrue();

            failed throw IOException
            File.Delete(_testFile);
        }