|
Post by mittu2222 on Dec 19, 2023 6:38:02 GMT
Sequential operations and interactive transactions. The way you simulate these depends largely on your testing goals and the context you use. But you can simulate this function in two common ways. Whether it is a sequential operation or an interactive transaction, the result of the completed transaction is ultimately returned from the function. If your test only cares about thingsthen. Your test will look very si photo editing servies milar to the test above that simulates the function's response. An example might look like this Test Function Copy In the test above you mocked the data for the post you wanted to create. What a mocking response should look like. This function is called after mocking the client method. Make sure the function's return value matches your expectations. By simulating the response of the function itself you don't have to worry about the order of operations of the transaction or what happens in the interactive transaction if that is the case. What if you want to test an interactive transaction that has important business logic that needs to be validated. This approach doesn't work because it completely abandons the inner.
|
|