My unit test class requires many helper methods - is this normal?

I have a class that installs software drivers through WMI. However, I noticed that when writing my unit tests to complete the statement, I need additional helper methods. For instance. to make sure the driver is added, I need to make sure that the number of drivers has increased by one, which is not a method in the class under the test.

Is this normal for unit tests, or am I doing something wrong? I'm just going to take all these helper methods and extract them into a static class.

thank

+3
source share
2 answers

, , unit test, , ( ). unit test .

, ,

  • , . . , .
  • , . .
  • , . + 1 ..

, , . , , , . , ( ) .

Unit test

Unit test - , , , -, (, cron) .. ( ), , .

, . , ( ) , .

, , , . , - , -, .. , (). .

, , , , , , .

. . , , FFmpeg. , , - , , -, AudioExtractor. Audio Extractor " ", , , ffmpeg.

Audio Extracto , ,

  • :
    • .
    • .
    • .
    • .

hamcrest ( ). , -, , , , , , , , .

, - - , , , , .

+6

: , , - . , , , .

. : " ", " " ( ).

0

All Articles