public void GetContentTitle_NotFound_ReturnsNull()
        {
            IDictionary <String, Object> values = new Dictionary <String, Object>
            {
                ["controller"] = null,
                ["action"]     = null,
                ["area"]       = null
            };

            Assert.Null(ResourceProvider.GetContentTitle(values));
        }
        public void GetContentTitle_GetsTitleWithoutArea(String area)
        {
            RouteValueDictionary values = new RouteValueDictionary();

            values["controller"] = "profile";
            values["action"]     = "edit";
            values["area"]       = area;

            String actual   = ResourceProvider.GetContentTitle(values);
            String expected = ContentTitles.ProfileEdit;

            Assert.Equal(expected, actual);
        }
        public void GetContentTitle_GetsTitleByIgnoringCase()
        {
            RouteValueDictionary values = new RouteValueDictionary();

            values["area"]       = "administration";
            values["controller"] = "roles";
            values["action"]     = "details";

            String expected = ContentTitles.AdministrationRolesDetails;
            String actual   = ResourceProvider.GetContentTitle(values);

            Assert.Equal(expected, actual);
        }
        public void GetContentTitle_GetsTitle()
        {
            RouteValueDictionary values = new RouteValueDictionary();

            values["area"]       = "Administration";
            values["controller"] = "Accounts";
            values["action"]     = "Details";

            String expected = ContentTitles.AdministrationAccountsDetails;
            String actual   = ResourceProvider.GetContentTitle(values);

            Assert.AreEqual(expected, actual);
        }
        public void GetContentTitle_IsCaseInsensitive()
        {
            IDictionary <String, Object> values = new Dictionary <String, Object>();

            values["area"]       = "administration";
            values["controller"] = "roles";
            values["action"]     = "details";

            String expected = ContentTitles.AdministrationRolesDetails;
            String actual   = ResourceProvider.GetContentTitle(values);

            Assert.Equal(expected, actual);
        }
 public void GetContentTitle_OnTitleNotFoundReturnsNull()
 {
     Assert.Null(ResourceProvider.GetContentTitle(new RouteValueDictionary()));
 }