I have got method which is using Assembly.LoadFrom(…) statement and returns the supported cultures from that satellite assembly, so how could I write unit tests for that type of methods.
What I did was, wrapped that static method/logic to return cultures in anther class and used it's instance method. Is this the right approach?
Is this the situation?
First principle: We are focusing on testing aMethod(), the testing of Assembly.LoadFrom() is a separate problem. While we are building tests for aMethod() we don't try to test its dependencies.
So here what kind of tests might we need?
It is easiest to do this if the test can supply a Mock implementation. Then we can test 1 by checking that the Mock received the expected value. Test 2 by returning a well defined value (or for mulitiple tests different interesting values) Test 3 by generating chosen error conditions.
So you have changed your code to something like this:
Maybe the loaded is injected in some other way, but the point is that you can now specify different tests my setting up a suitable loaoder. For example, for the first test.
So if that's the kind of thing you are doing then yes, I'd say you're enabling TDD.