how write unit test private static method in c#? have private static method?
private static <somereturntype> somemethodname(someparameters){}
the answer don't test implementation details of class, test behaviour or interactions. fact method static irrelevant.
you unit test should validate given conditions, calling public method results in expected response or expected interaction dependencies. how response generated or how interactions happen in class under test not important, what's important externally verifiable behaviour.
Comments
Post a Comment