Can't access the interface method from Rhino mock stub -
i'm using rhino mock unit testing in webapp using asp.net mvc , c#. i'm have problem creating stubs in 1 of method in service interface. method returning class. please kindly see below code,
the class of model acct
public class acct { public string name { get; set; } public static acct getacct( string user ) { ... } } interface account
public interface iaccount { acct getacct( string user ); } account service access method model class above,
public class account : iaccount { public acct getacct( string user ) { retrun acct.getacct( user ); } } then can't access getacct method of account service class when want create stub.
please advise.
many thanks.
the getacct method on account must virtual if want mocking framework (like rhino.mocks, moq, etc...) able mock it.
Comments
Post a Comment