Unit testing a service method- how to assert -
I'm trying to get my head around the idea of performance testing and reduce the number of requests.
Say that I have such a service method:
Public Zero Transfer Fund (Intit Debit ID, Intradent ID, Summer Fund) {Account Debit = Account Rippernary. Gate (debit ID); Account Credit = Account Repository. Gate (Credited); Debited.Debit (yoga); Credited.Credit (yoga); AccountRepository.Update (debit tax); AccountRepository.Update (credit); }
My Unit Testing I think that should be divided into two accounts, the deposit of one account and the debiting of the others should be examined. But should I be overwhelmed by the current status of each account for verification of the account which has been added / deducted - or is it an examination for my account model? If so, what should I say? That update was called? It does not confirm functionality ...
Anyone have an idea?
If you test the result (final balance), then you can also effectively manage account objects You are testing, which are not under test here, so if possible you should try it.
In this scenario, I hope the account will be an interface that you can be fake. I'm not sure what language you are using (looks like C #) in Java, I will do this with an interface and JMock.
Again, you believe that the transferfund method calls the exact sum debit to the correct account, and makes a credit call with the correct amount on the correct account. You will have to duplicate your account stock and return your mock account in response to your counterfeit frame account reply. Get
Comments
Post a Comment