I've done a little bit of Unit Testing using JUnit with a Java program, and I am new to the .NET unit testing space. I'm sure it can't be so different, though.
At work, we have a legacy VB .NET codebase, with zero unit testing going on. I want to start adding some unit testing to this thing, and I see the option in Visual Studio to use C# for unit testing.
My question is, am I even able to use C# for testing the VB code? I would definitely want to use this as an opportunity to work with C# instead of more VB. I can't find this question anywhere else online, interestingly enough, and would love some insight. It seems like I'm asking a dumb question, but I hope to get an answer that would help me understand this, especially as to why it's a dumb question, if it is.
Welcome to .Net
So short answer is yes. You can have a new unit/integration test project which can be in C# which effectively can test code written in any other .Net compliant language.
So how this works?
.Net is multi language framework. VB and C# are just popular ones. Once code written in any .Net compliant language it get compiled in IL code which is kind of similar to byte code in java and packed in DLL file.
So once dll is built, it can be referenced by any project using any .Net complaint language.
So how will you do it?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With