RajOpteamix / moq

Automatically exported from code.google.com/p/moq
Other
0 stars 0 forks source link

unable to create a mock from an abstract class with internal abstract methods #369

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem:

1. Create a public Interface in c# like public interface a{ void dosomething();}
2. Create a public abstract 
Class which is Drived from this interface like pubic abstract class 
b:a{a.internalmethod();}
3. additionally call from the intementan internal abstract method, which is 
also part of this abstract class.
like pubic abstract class b:a{
a.dosomething(){internalmethod(); }internal abstract void internalmethd();}
}
Now try to mock this class b like this:
What is the expected output? What do you see instead?
var mock = new Mock
<b>(MockBehavior.Loose);
mock.Object throws an Argument exception!
Please use labels and text to provide additional information.

Original issue reported on code.google.com by Boris.Go...@googlemail.com on 1 Oct 2013 at 7:08