Learn Unit Testing
Even you can code doesn’t mean you are an engineer.
It is true. Some expert said it a loud and then slap my face. Software Engineering isn’t just about the code itself, but including unit testing, source control, and a lot other things.
… and it is better to late than never. Now i decide give unit testing a try. Yes, maybe i am a coder, but not an engineer. Until now, i am still do unit testing manually.
But later, i feel, more complex our program, we need more a lot time to test our program. As my main programming language is C# and my IDE is Visual Studio, i start to learn Unit Test.
First, i create a Class Library Project via menu File > Create Project. Then create a simple class, just called it Human (or Hooman).
Only that ? Of course yes. Sorry for my laziness lol. Next i create Unit Test Project (right click Solution Explorer > Add > New Project), and then create test class.
There are several conditions to be tested. Like Work exceeds the remaining energy and much more.
I open test explorer via menu Test > Windows > Test Explorer. I look all test method available there, and run all. Magically all test passed.
Well, that is my simple try to learn Unit Testing in Visual Studio with C# Programming Language. I Hope in the future i always use it for my upcoming projects. Cheers!