Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

MVVMBlazor & UnitTest: how pass [Parameter] ? #32

Closed
gptucci opened this issue Jul 18, 2020 · 1 comment
Closed

MVVMBlazor & UnitTest: how pass [Parameter] ? #32

gptucci opened this issue Jul 18, 2020 · 1 comment
Labels
type: question Questions about the library

Comments

@gptucci
Copy link

gptucci commented Jul 18, 2020

Hi
Excuse my stupid question.
We are using TTD for a new project using MVVMBlazor. To test the View Models how can I pass the value for [Parameter] ?
Tnx

@klemmchr
Copy link
Owner

klemmchr commented Jul 19, 2020

Well, as the property needs to have a public setter you can just use an object initializer or set the property after creating the view model.

var vm = new MyViewModel
{
    MyParameter = "foo"
}

@klemmchr klemmchr added the type: question Questions about the library label Jul 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: question Questions about the library
Projects
None yet
Development

No branches or pull requests

2 participants