Пример #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello.");

            var reader    = new FileReader(new FileSystem());
            var football  = new FootballNotifier();
            var processor = new TeamProcessor(reader, football);

            Console.WriteLine($"Processing the file '{AppConstants.FullFileName}'.");
            try
            {
                var result = processor.GetTeamWithLeastPointDifference(AppConstants.FullFileName);

                Console.WriteLine($"The result is: {result}.");
            }
            catch (Exception exception)
            {
                Console.WriteLine($"The application threw the following exception: {exception.Message}.");
            }

            Console.WriteLine("I hoped you enjoyed it!");
        }
Пример #3
0
 public FootballNotifierTests()
 {
     _footballNotifier = new FootballNotifier();
 }
Пример #4
0
 public FootballNotifierTests()
 {
     _logger           = Substitute.For <ILogger>();
     _footballNotifier = new FootballNotifier(_logger);
 }