Esempio n. 1
0
 public void AuthorizateButtons_Ok()
 {
     Assert.True(MenuHelper.AuthorizateButtons("admin", "~/Admin/Profiles", "saveTheme"));
     Assert.False(MenuHelper.AuthorizateButtons("admin", "~/Admin/Profiles", "unitTest"));
 }
Esempio n. 2
0
 public void User_Ok()
 {
     Assert.False(MenuHelper.AuthorizateButtons(new FooHttpContext(), "~/Admin/Profiles1", "saveDisplayName"));
     Assert.False(MenuHelper.AuthorizateButtons(new FooHttpContext(), "~/Admin/Index", "saveDisplayName"));
 }