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)"); }
public void MenuItemGroupRemoveNullMenuItem() { tlog.Debug(tag, $"MenuItemGroupRemoveNullMenuItem START"); var testingTarget = new MenuItemGroup(); Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf <MenuItemGroup>(testingTarget, "Should return MenuItemGroup instance."); try { MenuItem item = null; testingTarget.Remove(item); } catch (ArgumentNullException) { tlog.Debug(tag, $"MenuItemGroupAdd END (OK)"); Assert.Pass("Caught MenuItemGroupRemoveNullMenuItem : Passed!"); } }