public List <Match> CreateMatches(List <Match> matches)
 {
     try
     {
         foreach (Match match in matches)
         {
             _matchVali.CheckIfMatchIsNull(match);
             _matchVali.ValidateMatch(match);
             _matchVali.ValidateMatchStartDate(match);
         }
         return(_matchRepo.CreateMatch(matches).ToList());
     }catch (Exception ex)
     {
         throw ex;
     }
 }
        public void TestThrowsExceptionIfMatchStartDateIsBeforeTodayOnCreate()
        {
            MatchValidator matchVali = new MatchValidator();

            Match match = new Match()
            {
                GuestTeam  = "DBF",
                HomeTeam   = "FBC",
                HomeScore  = 2,
                GuestScore = 2,
                StartDate  = new DateTime(2019, 11, 10)
            };
            Exception ex = Assert.Throws <InvalidDataException>(() =>
                                                                matchVali.ValidateMatchStartDate(match));

            Assert.Equal("Start date on match cannot be before today", ex.Message);
        }