Can I put two mocks of same class in an array?

1 view (last 30 days)
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?

Answers (0)

Products


Release

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!