Exemple #1
0
        public void MenuItemGroupRemove()
        {
            tlog.Debug(tag, $"MenuItemGroupRemove START");

            var testingTarget = new MenuItemGroup();

            Assert.IsNotNull(testingTarget, "null handle");
            Assert.IsInstanceOf <MenuItemGroup>(testingTarget, "Should return MenuItemGroup instance.");

            MenuItem item = new MenuItem()
            {
                BackgroundColor = Color.Cyan,
            };

            testingTarget.Add(item);

            try
            {
                testingTarget.Remove(item);
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception : Failed!");
            }

            tlog.Debug(tag, $"MenuItemGroupRemove END (OK)");
        }
Exemple #2
0
        public void MenuItemGroupAdd()
        {
            tlog.Debug(tag, $"MenuItemGroupAdd START");

            var testingTarget = new MenuItemGroup();

            Assert.IsNotNull(testingTarget, "null handle");
            Assert.IsInstanceOf <MenuItemGroup>(testingTarget, "Should return MenuItemGroup instance.");

            try
            {
                MenuItem item = null;
                testingTarget.Add(item);
            }
            catch (ArgumentNullException)
            {
                tlog.Debug(tag, $"MenuItemGroupAdd END (OK)");
                Assert.Pass("Caught ArgumentNullException : Passed!");
            }
        }