Exemplo n.º 1
0
        public ActionResult Index()
        {
            var            localeIsoCode = Thread.CurrentThread.CurrentCulture.Name;
            AboutViewModel model         = AboutManager.GetAboutDataProvidersViewModel(localeIsoCode);

            return(View(model));
        }
        public void GetSwedishAboutDataSourcesViewModel()
        {
            AboutViewModel model = AboutManager.GetAboutDataProvidersViewModel("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);
            }
        }
        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);
            }
        }