public void GivenAB_ReturnsPairWithKeyAMappedToAB()
        {
            var preprocessor = new DefaultStationPreprocessor();
            var result = preprocessor.GetStationBeginnings("ab");

            Assert.That(result.SingleOrDefault(x => x.Key == "a").Value, Is.EqualTo("ab"));
        }
        public void GivenA_Returns1KeyValuePair()
        {
            var preprocessor = new DefaultStationPreprocessor();
            var result = preprocessor.GetStationBeginnings("a");

            Assert.That(result.Count, Is.EqualTo(1));
        }
        public void GivenAB_ReturnsPairWithKeyAB()
        {
            var preprocessor = new DefaultStationPreprocessor();
            var result = preprocessor.GetStationBeginnings("ab");

            Assert.That(result.SingleOrDefault(x => x.Key == "ab"), Is.Not.Null);
        }
        public void GivenAB_Returns2Pairs()
        {
            var preprocessor = new DefaultStationPreprocessor();
            var result = preprocessor.GetStationBeginnings("ab");

            Assert.That(result.Count, Is.EqualTo(2));
        }
        public void GivenA_ReturnsWithValueA()
        {
            var preprocessor = new DefaultStationPreprocessor();
            var result = preprocessor.GetStationBeginnings("a");

            Assert.That(result.Single().Value, Is.EqualTo("a"));
        }
        public void GivenWhitespace_ReturnsEmptyList()
        {
            var preprocessor = new DefaultStationPreprocessor();
            var result = preprocessor.GetStationBeginnings("         \t          \n       ");

            Assert.That(result, Is.Empty);
        }
 public void GivenNull_ThrowsArgumentNullException()
 {
     var preprocessor = new DefaultStationPreprocessor();
     Assert.Throws<ArgumentNullException>(() => preprocessor.GetStationBeginnings(null));
 }
        public void GivenEmptyString_ReturnsEmptyList()
        {
            var preprocessor = new DefaultStationPreprocessor();
            var result = preprocessor.GetStationBeginnings(string.Empty);

            Assert.That(result, Is.Empty);
        }