Пример #1
0
        public static void Simulate()
        {
            SimulateRound(ClubStatus.Round);
            ClubStatus.Round++;
            if (ClubStatus.Round < 39)
            {
                ClubStatus.CurrentDate.AddDays(7);
            }
            //ClubStatus.CurrentDate = Convert.ToDateTime(ScheduleRepo.GetDate(ClubStatus.Round));
            else
            {
                ClubStatus.CurrentDate = ClubStatus.SeasonEnd;
            }

            if (ClubStatus.RoundsToJunior == 0)
            {
                var country = CountryRepo.GetCountry(ClubStatus.JuniorCountry);
                Scout.Send(ClubStatus.Junior, country);
                ClubStatus.RoundsToJunior--;
            }
            else if (ClubStatus.RoundsToJunior > 0)
            {
                ClubStatus.RoundsToJunior--;
            }
            ClubStatus.SerializeSave();
        }
Пример #2
0
        public async void GetCountryByNameTest(string inlineName, string expected)
        {
            //Arrange
            IList <CountryModel> countries = GenerateCountries();
            var travelAPIContextMock       = new Mock <TravelAPIContext>();

            travelAPIContextMock.Setup(c => c.Countries).ReturnsDbSet(countries);

            var logger = Mock.Of <ILogger <CountryRepo> >();
            var countriesRepository = new CountryRepo(travelAPIContextMock.Object, logger);

            //Act
            var theCountry = await countriesRepository.GetCountry(inlineName);

            //Assert
            Assert.Equal(expected, theCountry.Name);
        }