chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
Welcome to Typemock Community! Here you can ask and receive answers from other community members. If you liked or disliked an answer or thread: react with an up- or downvote.
0 votes
I have code that is similar to the following:

User user = new User();
Ticket ticket = new Ticket();

//Setup mocks
MockManager.Init();
MockObject<TicketManager> mockTicketManager = MockManager.MockObject<TicketManager>(Constructor.Mocked);
mockTicketManager.ExpectAndReturn("Save", ticket);
mockTicketManager.ExpectUnmockedCall("AddSubscriber");

TicketManager ticketManager = mockTicketManager.Object;
SubscriberRelationship relationship = ticketManager.AddSubscriber(user, ticket);


When I run this test under the debugger (VSTS w/ MSTest) it works fine. When run it normally I get a runtime exception "System.MissingMethodException: Method not found: 'Void TicketManager.AddSubscriber(User, Ticket)'

I'm pretty sure I'm doing something wrong, or at least unexpected. Any ideas?
asked by rrinaldi (1.2k points)

1 Answer

0 votes
Nevermind. This was an issue with MSTest using an old version of my assembly. I fixed it by deleting all the output from my projects and rebuilding.
answered by rrinaldi (1.2k points)
...