Jan 22, 2010

make your obsolete method invisible

When I started to use moq, there was lots example of moq that use mock.Setup method, althought these code can be compile. The this method is not shown up in intellisense popup, it turns out in the latest version of moq, it hide this memeber like below.

[Obsolete("Expect has been renamed to Setup.", false)]
public ISetup<T> Expect(Expression<Action<T>> expression);