Inheritance: MonoBehaviour
        public ActionResult Index()
        {
            string         localeIsoCode = Thread.CurrentThread.CurrentCulture.Name;
            AboutViewModel model         = AboutManager.GetAboutPresentationFormatViewModel(localeIsoCode);

            return(View(model));
        }
Ejemplo n.º 2
0
        public ActionResult Index()
        {
            var            localeIsoCode = Thread.CurrentThread.CurrentCulture.Name;
            AboutViewModel model         = AboutManager.GetAboutDataProvidersViewModel(localeIsoCode);

            return(View(model));
        }
        public void GetSwedishAboutFiltersViewModel()
        {
            AboutViewModel model = AboutManager.GetAboutFiltersViewModel("sv-SE");

            Assert.IsTrue(model.TitleLabel.IsNotEmpty());
            Assert.IsTrue(model.Description.Length > model.TitleLabel.Length);
            Assert.IsTrue(model.Items.Count == 4);
            foreach (AboutItem item in model.Items)
            {
                Assert.IsTrue(item.Header.IsNotEmpty());
                Assert.IsTrue(item.Description.Length > item.Header.Length);
            }
        }
Ejemplo n.º 4
0
        public static List <About> GetAboutsFromCache()
        {
            var result = WebCache.Get("about-cache");

            if (result == null)
            {
                AboutManager aboutManager = new AboutManager();
                result = aboutManager.List();

                WebCache.Set("about-cache", result, 20, true);
            }

            return(result);
        }
        public void GetAboutDataSourcesViewModel()
        {
            AboutViewModel model = AboutManager.GetAboutDataProvidersViewModel("");

            //Assert.AreEqual("Data sources", model.TitleLabel);
            //Assert.AreEqual("The portal is connected to several data sources by default. Environmental data of different types are available as separate map layers while species observations from several sources are provided in a unified format particularly suitable for biodiversity analyses.", model.Description);
            Assert.IsTrue(model.TitleLabel.IsNotEmpty());
            Assert.IsTrue(model.Description.Length > model.TitleLabel.Length);
            Assert.IsTrue(model.Items.Count == 4);
            foreach (AboutItem item in model.Items)
            {
                Assert.IsTrue(item.Header.IsNotEmpty());
                Assert.IsTrue(item.Description.Length > item.Header.Length);
            }
        }
Ejemplo n.º 6
0
        public IEnumerable <About> Get()
        {
            IEnumerable <About> hakkımda = AboutManager.Get();

            return(hakkımda);
        }
 public ActionResult Index()
 {
     string localeIsoCode = Thread.CurrentThread.CurrentCulture.Name;
     AboutViewModel model = AboutManager.GetAboutCalculationsViewModel(localeIsoCode);             
     return View(model);
 }
 public AboutController()
 {
     this.aboutManager = new AboutManager();
 }