public void VectorChanged_ResetWhileAttached_AllDetached() { StubBehavior[] behaviorArray = { new StubBehavior(), new StubBehavior(), new StubBehavior() }; BehaviorCollection behaviorCollection = new BehaviorCollection(); behaviorCollection.Attach(new Button()); foreach (StubBehavior behavior in behaviorArray) { behaviorCollection.Add(behavior); } behaviorCollection.Clear(); foreach (StubBehavior behavior in behaviorArray) { TestUtilities.AssertDetached(behavior); } }