Exemplo n.º 1
0
        public string GetTeamWithLeastPointDifference(string fileLocation)
        {
            // Contract requirements.
            if (string.IsNullOrWhiteSpace(fileLocation))
            {
                throw new ArgumentNullException(nameof(fileLocation), "The file location can not be null.");
            }

            var fileData = _fileReader.GetFootballData(fileLocation);
            var result   = _footballNotifier.GetTeamWithSmallestPointRange(fileData);

            return(result);
        }
Exemplo n.º 2
0
        public void Test_get_team_with_valid_input_and_data_returns_expected_day()
        {
            // Arrange.
            const string expected = "banana";
            const string input    = "fullFile";

            _reader.GetFootballData(Arg.Any <string>()).Returns(new List <Football>());
            _notify.GetTeamWithSmallestPointRange(Arg.Any <List <Football> >()).Returns("banana");

            // Act.
            var actual = _teamProcessor.GetTeamWithLeastPointDifference(input);

            // Assert.
            actual.Should().Be(expected);
        }