Probably a dumb question, but can you write a unit test project in one language to test against another project in a different language?
I'd like to translate one of our VB assemblies into C#, but want to build unit tests to verify the results. I've tried to set a unit test project up to do this, but I can't seem to access the VB code within a unit test... I can't figure out if I'm just missing/doing something stupid, or it really isn't allowed.
EDIT: I'm going to close this as it seems I've gotten my "Yes, it's possible" answer... I am referencing it, so there's gotta be just something I'm not seeing.
Once you add a reference to your original project or assembly in your unit test project, you should be able to write a unit test without problems, assuming the members you want to test are public. (You can add an InternalsVisibleTo assembly attribute in the original assembly if you need access to classes marked internal).
Reference the vb.net assembly or project in the test project, you'll have access to all public classes and members.
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