public void TestFireOnce() { int ea = 0; EventHandler <EventArgs> eventWithArgs = (sender, args) => ea++; Delegates.AttachWithUnsubscribe(this, nameof(DelegateTests.TestEventArgs), eventWithArgs); TestEventArgs?.Invoke(this, null); TestEventArgs?.Invoke(this, null); TestEventArgs?.Invoke(this, null); ea.ShouldBeEquivalentTo(1); TestEventArgs.Should().BeNull(); }