public void EventShouldKnowWhatItIsBoundTo() { var testSubject = new TestableEvent<int>(); testSubject.IsBoundTo(_Target).Should().BeFalse(); testSubject.BindTo(_Target); testSubject.IsBoundTo(_Target).Should().BeTrue(); }
public void EventShouldDifferentiateFunctionsOnSameTarget() { var testSubject = new TestableEvent <int>(); testSubject.BindTo(_Target); testSubject.IsBoundTo(_FalseTarget).Should().BeFalse(); }
public void EventShouldDifferentiateSameMethodWithDifferentTargets() { var testSubject = new TestableEvent<int>(); var other = new HelperClassMakesEventSupportQuerying(); testSubject.BindTo(_Target); testSubject.IsBoundTo(other._Target).Should().BeFalse(); }
public void EventShouldDifferentiateSameMethodWithDifferentTargets() { var testSubject = new TestableEvent <int>(); var other = new HelperClassMakesEventSupportQuerying(); testSubject.BindTo(_Target); testSubject.IsBoundTo(other._Target).Should().BeFalse(); }
public void EventShouldKnowWhatItIsBoundTo() { var testSubject = new TestableEvent <int>(); testSubject.IsBoundTo(_Target).Should().BeFalse(); testSubject.BindTo(_Target); testSubject.IsBoundTo(_Target).Should().BeTrue(); }
public void EventShouldSupportRegistrationOfHandlersThatCanBeQueried() { var testSubject = new TestableEvent<int>(); _arg = -1; testSubject.BindTo(_Target); _arg.Should().Be(-1); testSubject.Call(3); _arg.Should().Be(3); }
public void EventShouldSupportUnbinding() { var testSubject = new TestableEvent<int>(); testSubject.BindTo(_Target); testSubject.Call(5); testSubject.UnbindFrom(_Target); testSubject.IsBoundTo(_Target).Should().BeFalse(); testSubject.Call(9); _arg.Should().Be(5); }
public void EventShouldSupportRegistrationOfHandlersThatCanBeQueried() { var testSubject = new TestableEvent <int>(); _arg = -1; testSubject.BindTo(_Target); _arg.Should().Be(-1); testSubject.Call(3); _arg.Should().Be(3); }
public void EventShouldSupportUnbinding() { var testSubject = new TestableEvent <int>(); testSubject.BindTo(_Target); testSubject.Call(5); testSubject.UnbindFrom(_Target); testSubject.IsBoundTo(_Target).Should().BeFalse(); testSubject.Call(9); _arg.Should().Be(5); }
public void EventShouldDifferentiateFunctionsOnSameTarget() { var testSubject = new TestableEvent<int>(); testSubject.BindTo(_Target); testSubject.IsBoundTo(_FalseTarget).Should().BeFalse(); }