public void Run1() { TestEvent one = default; TestEvent two = default; TestEvent three = default; TestEvent four = default; one = new TestEvent(1, () => { ev.Remove(two); ev.Remove(three); }); two = new TestEvent(2); three = new TestEvent(3); four = new TestEvent(4); ev.Add(one); ev.Add(two); ev.Add(three); ev.Add(four); ev.SetResult(10); ev.SetResult(20); ev.SetResult(30); one.NextCalled.Should().BeEquivalentTo(10, 20, 30); two.NextCalled.Count.Should().Be(0); three.NextCalled.Count.Should().Be(0); four.NextCalled.Should().BeEquivalentTo(10, 20, 30); }
public void Run1() { TestEvent one = default; one = new TestEvent(1, () => ev.Remove(one)); var two = new TestEvent(2); var three = new TestEvent(3); ev.Add(one); ev.Add(two); ev.Add(three); ev.SetResult(10); ev.SetResult(20); ev.SetResult(30); one.NextCalled.Should().BeEquivalentTo(10); two.NextCalled.Should().BeEquivalentTo(10, 20, 30); three.NextCalled.Should().BeEquivalentTo(10, 20, 30); }
public void Run1() { TestEvent one = default; TestEvent two = default; TestEvent three = default; one = new TestEvent(1, () => ev.Remove(two)); two = new TestEvent(2); three = new TestEvent(3); ev.Add(one); ev.Add(two); ev.Add(three); ev.SetResult(10); ev.SetResult(20); ev.SetResult(30); one.NextCalled.Should().Equal(10, 20, 30); two.NextCalled.Count.Should().Be(0); three.NextCalled.Should().Equal(10, 20, 30); }