Esempio n. 1
0
        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;
 }