ying-hui.the@windev.co.uk (47) [Avatar] Offline
.. adding some more tests to the CountersViewModelTests unit test class as shown in listing 8.38 .

in listing 8.22, is a CountersViewModel viewModel;

in listing Listing 8.38. viewModel is implied to be a: CounterViewModel

whats my deliberate mistake?
Jim Bennett (88) [Avatar] Offline
Can you provide more explanation please. I'm not sure what problem you are facing.
ying-hui.the@windev.co.uk (47) [Avatar] Offline
well obviously i am working through the book adding bits at each stage. seeing the unit tests working great. then i go to a bit where nothing will compile, because things need defintions ahead of what I am reading, but like I said, listing 8.38 suposses that a type is one thing and a previous one says it something else.

So i'm just trying to get it working. Currently I think that line 2 in listing 8.38 might be

viewModel = new CountersViewModel(mockCountersService.Object, messenger.Object, mockNavigationService.Object);

Obviously I cant be sure ...

shall I send you my project? Can you send me the one that you know works.


Jim Bennett (88) [Avatar] Offline
OK - makes more sense now. You are right.

In the setup it should be:

viewModel = new CountersViewModel(countersService.Object,

Good spot - I've updated the book and it should be in the next MEAP release. Thanks!