private StringCalculator GivenAStringCalculator() { INumberExtractor numberExtractor = new NumberExtractorFromCommaSeparatedString(); INumberRemover numberRemover = createNumberRemover(); INumberValidator numberValidator = createNumberValidator(); return(new StringCalculator(numberExtractor, numberRemover, numberValidator)); }
public StringCalculator(INumberExtractor numberExtractor, INumberRemover numberRemover, INumberValidator numberValidator) { this.numberExtractor = numberExtractor; this.numberRemover = numberRemover; this.numberValidator = numberValidator; }