I have this:
class FooGenerator:IFooGenerator {
private object _generated;
public void Generate() {
// Generating
GenerateSmallPart();
GenerateOtherSmallPart();
GenerateTinyPart();
// A lot similar
}
private void GenerateSmallPart() {
//add small part to _generated
}
private void GenerateOtherSmallPart() {
//add small part to _generated
}
private void GenerateTinyPart() {
//add small part to _generated
}
}
internal interface IFooGenerator {
void Generate();
}
In my application I use only IFooGenerator
via IoC but I want to test all those sub methods.
As I found here, one option is to extract class with all sub methods. But why do i need to do that. It is only being used in FooGenerator
.
Do you have any suggestions how can i make my class more testable?