![]() ![]() In this case, you can't just override a protected method, but you can extract the DB logic to a protected field and then override it in the test. One easy way to do this is to make private members protected, and then override the protected field.įor example, let's say you have a class that loads some stuff from the database during the constructor. In this comment author name is Excel Tip, now we want to change the author name to Excel Tip. You can edit in the comment box and can change the author name. A popup will appear, from the list, select Edit Comment. Select the cell E11 in which comment inserted. Secondly, I found a great way to avoid making tons of changes in old code is to just refactor it a little until you can test it. To Edit the cells comments follow below given steps:. ![]() First of all, here's a great article with tips on unit testing. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |