public void ImplementationDoesNotRelyOnObjectHashCode() { var instance = new TestObject(42); this.testee.AddActivatedInstance(instance); instance.ChangeHashCode(43); var isActivated = this.testee.IsActivated(instance); isActivated.Should().BeTrue(); }
public void IsDeactivatedReturnsTrueForObjectsInTheDeactivationCache() { var instance = new TestObject(42); this.testee.AddDeactivatedInstance(instance); var deactivated = this.testee.IsDeactivated(instance); var deactivatedObjectCount = this.testee.DeactivatedObjectCount; deactivated.Should().BeTrue(); deactivatedObjectCount.Should().Be(1); }