aman
aman

Reputation: 21

Microsoft Moles does not generate Stub or Mole for types with obsolete members

We were successfully generating stubs and moles for third party vendor assemblies for our unit tests. With their recent updates a lot of types are being ignored as certain methods have been declared obsolete(...,true). Is there a work around at all. We want to avoid starting from scratch using a new mocking tool..

Upvotes: 2

Views: 410

Answers (1)

Rami A.
Rami A.

Reputation: 10602

See: Stub generation failes with obsolete attribute, Pex v0.94.51023.0
"This is by design. When a method is marked at Obsolete(..., true), C# will not allow [you] to instantiate [a] class implementing that interface."

Upvotes: 2

Related Questions