Package:matlab.mock
Superclasses:matlab.unittest.TestCase
TestCase
to write tests with mocking framework
Use thematlab.mock.TestCase
class to write tests that use the mocking framework. Thematlab.mock.TestCase
来源于matlab.unittest.TestCase
class.
The testing framework constructs thematlab.mock.TestCase
instances.
assertAccessed | Assert that a property was accessed |
assertCalled | Assert that a method was called with certain input values |
assertNotAccessed | Assert that a property was not accessed |
assertNotCalled | Assert that a method was not called with certain input values |
assertNotSet | Assert that a property was not set |
assertSet | Assert that a property was set |
assignOutputsWhen | Define return values for method call or property access |
assumeAccessed | Assume that a property was accessed |
assumeCalled | Assume that a method was called with certain input values |
assumeNotAccessed | Assume that a property was not accessed |
assumeNotCalled | Assume that a method was not called with certain input values |
assumeNotSet | Assume that a property was not set |
assumeSet | 假设一个属性组 |
clearMockHistory | Clear history of mock object interactions |
createMock | Create mock object |
fatalAssertAccessed | Fatally assert that a property was accessed |
fatalAssertCalled | Fatally assert that a method was called with certain input values |
fatalAssertNotAccessed | Fatally assert that a property was not accessed |
fatalAssertNotCalled | Fatally assert that a method was not called with certain input values |
fatalAssertNotSet | Fatally assert that a property was not set |
fatalAssertSet | Fatally assert that a property was set |
forInteractiveUse | CreateTestCase for interactive use of mock objects |
getMockHistory | Return history of mock interactions fromTestCase instance |
returnStoredValueWhen | Return stored value when property is accessed |
storeValueWhen | Store value when property is set |
throwExceptionWhen | Throw exception for method call or property interaction |
verifyAccessed | Verify that a property was accessed |
verifyCalled | Verify that a method was called with certain input values |
verifyNotAccessed | Verify that a property was not accessed |
verifyNotCalled | Verify that a method was not called with certain input values |
verifyNotSet | Verify that a property was not set |
verifySet | Verify that a property was set |
addTeardown | Dynamically add teardown routine toTestCase instance |
applyFixture | Use fixture withTestCase |
forInteractiveUse | Create TestCase for interactive use |
getSharedTestFixtures | Provide access to shared test fixtures |
log | Record diagnostic information during test execution |
onFailure | Dynamically add diagnostics for test failures |
run | RunTestCase test |
Also, theTestCase
class inherits methods from these classes:
Handle. To learn how handle classes affect copy operations, seeCopying Objects.