Using the main class method for debugging?

Is it good to use the main method for testing the java / .net class?

I saw how it was recommended in some text books, but it seems to me that using a unit testing system will make more sense ...

The main method gives you one entry point to the class, and you can test one aspect of the functionality of the classes. You might have guessed that many are testing, but that doesn't make sense, like using Junit or Nunit.

+5
source share
4 answers

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

+2

, , - - . , .

[EDIT] , , , , , , .

+1

, , unit test ( ) .

0

Java , .NET , , CS0017 Compile with /main to specify the type that contains the entry point.

, Java .

0

All Articles