Can I put two mocks of same class in an array?
1 view (last 30 days)
Show older comments
I am using the mock testing framework to create mocks.
I create two different mock instances of the same class, for example, `obj1 = testCase.createMock(?Foo)` and `obj2 = testCase.createMock(?Foo)`. (The two instances play two different roles in my test.) When I attempt to put these instances in an array, `[obj1 obj2`, Matlab reports any '...error converting from `FooMock_1`to `FooMock`'.
How do I create two different mock instances of the same mocked type?
0 Comments
Answers (0)
See Also
Categories
Find more on Mock Dependencies in Tests in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!