c# - Extracting class when TDD'ing. How to test the new extracted class? -


So I had some ways in my main class that used the matrix to turn pixels on or off. I had to run all of my current tests and I decided that the time to remove certain arguments related to the matrix is ​​already there and matrix is ​​class.

My question is, there are currently exams for my SQ class (I am just in the beginning, so I am currently only one class, main part of the SU), should I make unit test for this? If so, how do you do it? I mean, should I tell all my code properly, because it's okay, once in one test, test one by one, as long as I see that I want all the functionality in it and only there Do I Reflect Your Code? I am just making the matrix class straight and just make sure that old tests are still going and it is all right?

Thanks

Actually the latter. There is no need to take any class only exams because it is defined as a specific category. If you are restructuring without adding any functionality or otherwise changing the behavior, the only reason to add tests is that you have a lack of confidence in some part of the code. Otherwise, the code is already in trial, and the fact is that it should be tested through another class.

It is being said, there are times where the structure of the code has changed a lot, that you want to take the exams for organizational purposes, so you can tell that this part of the code actually Where is being tested, but it is a separate question that "this is an independent entity, so it should be independent test."


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -