public void ExtractTestRule5_3()
        {
            //If there are more than three words, an exception is thrown
            MockNameProvider prv = new MockNameProvider("Mr John Wood Jr");

            (new NameExtractor(prv)).Extract();
        }
        public void ExtractTestRule5_2()
        {
            //If there are more than three words, an exception is thrown
            MockNameProvider prv = new MockNameProvider(string.Join(validSpacers[0], validFirstNames));

            (new NameExtractor(prv)).Extract();
        }
        public void ExtractTestConstructor()
        {
            //The class' constructor takes an INameProvider instance and will call this interface in order to fetch the name to break down
            //Name should be extracted on construction time, not extraction
            MockNameProvider prv      = new MockNameProvider(validTitles[0] + " " + validFirstNames[0] + " " + validLastNames[0]);
            NameExtractor    exractor = new NameExtractor(prv);

            prv.replaceMockName(validTitles[1] + " " + validFirstNames[1] + " " + validLastNames[1]);

            CheckResults(exractor.Extract(), new NameExtractionResult()
            {
                Title     = validTitles[0],
                FirstName = validFirstNames[0],
                LastName  = validLastNames[0]
            });
        }
        private void runOneWay(string source, NameExtractionResult expected)
        {
            MockNameProvider prv = new MockNameProvider(source);

            CheckResults((new NameExtractor(prv)).Extract(), expected);
        }