public void Dispose_WithUsingWasNotFinalized()
        {
            //Act
            var id     = Guid.NewGuid();
            var actual = new DisposableData();

            m_tracker.TryAdd(id, actual);
            using (var target = new TestDisposableObjectWithFinalizer(id))
            {
            };

            //Assert
            actual.WasDisposed.Should().BeTrue();
            actual.WasFinalized.Should().BeFalse();
        }
        public void Dispose_WithExplicitCallWasNotFinalized()
        {
            //Arrange
            var id     = Guid.NewGuid();
            var actual = new DisposableData();

            m_tracker.TryAdd(id, actual);

            //Act
            var target = new TestDisposableObjectWithFinalizer(id);

            target.Dispose();

            //Assert
            actual.WasDisposed.Should().BeTrue();
            actual.WasFinalized.Should().BeFalse();
        }
        public void Dispose_NoDisposeWasFinalized()
        {
            //Arrange
            var id     = Guid.NewGuid();
            var actual = new DisposableData();

            m_tracker.TryAdd(id, actual);

            //Act
            {
                var target = new TestDisposableObjectWithFinalizer(id);
                target = null;
            };
            GC.Collect();
            GC.WaitForPendingFinalizers();

            //Assert
            actual.WasDisposed.Should().BeFalse("Was disposed");
            actual.WasFinalized.Should().BeTrue("Not finalized");
        }