public void WhenEventModifierIsSetModificationsAreApplied() { // Arrange var fakeModification = new FakeModification { ModifyValueTo = "Yes we can" }; var aggregateRoot = new MyAggregateRoot(); var domainEvent = new EventForModificationTestEvent(); EventModifier.Modification = fakeModification; // Act aggregateRoot.Apply(domainEvent); // Assert Assert.AreEqual(domainEvent.ModifiedValue, fakeModification.ModifyValueTo); // Teardown EventModifier.Modification = null; }