Comments (2)
Imported comment written by James Lavery on 2018-10-15T09:58:42
Although this post is over 4 years old, it's still very useful!
I have a couple of questions though:
* How are you setting up your ViewModel with regard to injecting the navigation service?
* Is NavigationCommand must be using the Navigation service - so is this being mocked? Or is the call to the Navigation service being intercepted by the MockDispatcher?
from damirscorner-utterances.
Imported comment written by Damir Arh on 2018-10-20T06:35:35
I don't remember the details after all this time, but I took another look at the project I based the blogpost on.
As far as I can see, there's no direct interaction with navigation service in my code. All the navigation is implemented by calling ShowViewModel method on the MvxViewModel base class of all my view models. It is implemented in the MvxNavigatingObject base class.
Here's an example of a command definition:
PlayersEditorCommand = new MvxCommand(() => ShowViewModel<playerseditorviewmodel>());
The ShowViewModel method implementation must be obtaining the instance of the MockDispatcher using Ioc when it requests IMvxViewDispatcher. That's why the navigation calls are intercepted by that class and I can then verify which were made.
from damirscorner-utterances.
Related Issues (20)
- /blog/posts/20220408-DebounceSearchCallsInAngular.html HOT 2
- /blog/posts/20221007-CustomizingAdvancedSlidesForObsidian.html HOT 3
- /blog/posts/20230106-UsingMdcInQuarkus.html HOT 2
- blog/posts/20211203-StronglyTypedNgTemplateInAngular HOT 1
- blog/posts/20220930-ResettingPublishingProfilePassword
- blog/posts/20230414-RunGitHubActionsOnASynologyNas
- blog/posts/20230407-DatabaseConnectionsOverSsh HOT 1
- blog/posts/20220729-CrossComponentAngularForms HOT 3
- blog/posts/20230602-UpdatingTheSelfHostedGitHubRunner HOT 2
- blog/posts/20220923-TroubleshootingXamlErrorInWpf HOT 1
- blog/posts/20210910-AsynchronousPipesInAngular HOT 1
- blog/posts/20210917-TestingTimersWithFakeAsync HOT 1
- blog/posts/20211126-UsingNvmOnWindows HOT 3
- blog/posts/20221209-ShowingKeyboardShortcutsInIde HOT 1
- blog/posts/20180831-CodeGenerationWithMavenCxfPlugin HOT 1
- blog/posts/20220520-ComparingJsonStringsInUnitTests HOT 2
- blog/posts/20220211-CustomEventTypesInIonic HOT 2
- blog/posts/20230310-TypeScriptInteropInBlazor HOT 1
- blog/posts/20221223-MockitoAndNonNullTypesInKotlin HOT 1
- blog/posts/20210312-ReturnValueFromXamarinFormsShellModal HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from damirscorner-utterances.