public void RemoveAdvisedSupportListener() { IAdvisedSupportListener listener = MockRepository.GenerateMock <IAdvisedSupportListener>(); ProxyFactory factory = new ProxyFactory(new TestObject()); factory.AddListener(listener); factory.RemoveListener(listener); factory.GetProxy(); // check that no lifecycle callback methods were invoked on the listener... listener.AssertWasNotCalled(x => x.Activated(Arg <AdvisedSupport> .Is.Anything)); listener.AssertWasNotCalled(x => x.AdviceChanged(Arg <AdvisedSupport> .Is.Anything)); listener.AssertWasNotCalled(x => x.InterfacesChanged(Arg <AdvisedSupport> .Is.Anything)); }
public void RemoveNullAdvisedSupportListenerIsOk() { ProxyFactory factory = new ProxyFactory(new TestObject()); factory.RemoveListener(null); }