Exemplo n.º 1
0
        public void SelectorExtensionsAdd()
        {
            tlog.Debug(tag, $"SelectorExtensionsAdd START");

            Selector <Color> colors = new Selector <Color>();

            IList <SelectorItem <Color> > list = new List <SelectorItem <Color> >();

            var item = new SelectorItem <Color>()
            {
                Value = Color.Cyan,
                State = ControlState.All
            };

            item.ToString();
            list.Add(item);

            try
            {
                SelectorExtensions.Add(list, ControlState.All, Color.White);
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception : Failed!");
            }

            tlog.Debug(tag, $"SelectorExtensionsAdd END (OK)");
        }
Exemplo n.º 2
0
        public void SelectorExtensionsAddWithNullList()
        {
            tlog.Debug(tag, $"SelectorExtensionsAddWithNullList START");

            Selector <Color> colors = new Selector <Color>();

            IList <SelectorItem <Color> > list = null;

            try
            {
                SelectorExtensions.Add(list, ControlState.All, Color.White);
            }
            catch (ArgumentNullException)
            {
                tlog.Debug(tag, $"SelectorExtensionsAddWithNullList END (OK)");
                Assert.Pass("Caught ArgumentNullException : Passed!");
            }
        }