public void EventShouldKnowWhatItIsBoundTo() { var testSubject = new TestableEvent<int>(); testSubject.IsBoundTo(_Target).Should().BeFalse(); testSubject.BindTo(_Target); testSubject.IsBoundTo(_Target).Should().BeTrue(); }
public void EventShouldKnowWhatItIsBoundTo() { var testSubject = new TestableEvent <int>(); testSubject.IsBoundTo(_Target).Should().BeFalse(); testSubject.BindTo(_Target); testSubject.IsBoundTo(_Target).Should().BeTrue(); }
public void EventShouldDifferentiateSameMethodWithDifferentTargets() { var testSubject = new TestableEvent<int>(); var other = new HelperClassMakesEventSupportQuerying(); testSubject.BindTo(_Target); testSubject.IsBoundTo(other._Target).Should().BeFalse(); }
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 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 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(); }