Exemplo n.º 1
0
        public void SecurityPluginRegisterRoutesTest()
        {
            SecurityPlugin plugin = new SecurityPlugin();
            RouteCollection routeCollection = new RouteCollection();

            plugin.RegisterRoutes(routeCollection);

            Assert.That(routeCollection.Count == 2);
        }
Exemplo n.º 2
0
        public void SecurityPluginBuildActionsTest()
        {
            SecurityPlugin plugin = new SecurityPlugin();
            Role role = Role.None;

            IEnumerable<Common.Models.Action> actions = plugin.BuildActions();

            Assert.That(actions.Count() == 0);
        }
Exemplo n.º 3
0
        public void SecurityPluginBuildMenuTest()
        {
            Menu menu = new Menu();
            SecurityPlugin plugin = new SecurityPlugin();

            menu.Add(plugin.BuildMenuItems());

            Assert.AreEqual(menu.Items.Count(), 1);
            //Assert.That(menu.Items[0].Text == "Security");
            //Assert.That(menu.Items[0].Controller == "Security");
            //Assert.That(menu.Items[0].Action == "Index");
        }
Exemplo n.º 4
0
 public void SecurityPluginGetNameTest()
 {
     SecurityPlugin plugin = new SecurityPlugin();
     Assert.That(plugin.GetName() == "SecurityPlugin");
 }