public DashboardController(
     GetUserByClaimId getUser,
     GetCountries getCountries,
     IServiceLocator serviceLocator,
     IChartDataService chartDataService)
     : base(getUser, serviceLocator)
 {
     this.getCountries = getCountries;
     this.chartDataService = chartDataService;
 }
        public void WhenGettingCountryListAndRepositoryReturnsNoRecords_ThenReturnsEmptyCollection()
        {
            var countryRepositoryMock = new Mock<ICountryRepository>();
            countryRepositoryMock.Setup(c => c.GetAll()).Returns(new List<Country>());
            var services = new GetCountries(countryRepositoryMock.Object);

            var countries = services.Execute();

            Assert.Empty(countries);
        }
        public void WhenGettingCountryList_ThenReturnsCountryNames()
        {
            var countryRepositoryMock = new Mock<ICountryRepository>();
            countryRepositoryMock.Setup(c => c.GetAll()).Returns(new List<Country>() {new Country()});
            var services = new GetCountries(countryRepositoryMock.Object);

            var countries = services.Execute();

            Assert.NotNull(countries);
            Assert.Equal(1, countries.Count);
        }
 public ProfileController(
     UpdateUser updateUser,
     GetUserByClaimId getUser,
     GetCountries getCountries,
     IFormsAuthentication formsAuthentication)
     : base(getUser, null)
 {
     _updateUser = updateUser;
     _getCountries = getCountries;
     _formsAuthentication = formsAuthentication;
 }
 public GetCountriesController(GetCountries getCountries)
 {
     this.getCountries = getCountries;
 }