Ejemplo n.º 1
0
        public void FlagEnum_Create_IEnumerable()
        {
            IEnumerable <TreeNodeDifference> enumerable = new[] { TreeNodeDifference.ParentId, TreeNodeDifference.Position };

            var value = FlagEnum.Create(enumerable);

            Assert.AreEqual(TreeNodeDifference.ParentId | TreeNodeDifference.Position, value.Value);
        }
Ejemplo n.º 2
0
        public void FlagEnum_Create_IReadOnlyCollection()
        {
            IReadOnlyCollection <TreeNodeDifference> list = new List <TreeNodeDifference>
            {
                TreeNodeDifference.ParentId,
                TreeNodeDifference.Position
            }.AsReadOnly();

            var value = FlagEnum.Create(list);

            Assert.AreEqual(TreeNodeDifference.ParentId | TreeNodeDifference.Position, value.Value);
        }
Ejemplo n.º 3
0
        public void FlagEnum_Create_IList()
        {
            IList <TreeNodeDifference> list = new List <TreeNodeDifference>
            {
                TreeNodeDifference.ParentId,
                TreeNodeDifference.Position
            };

            var value = FlagEnum.Create(list);

            Assert.AreEqual(TreeNodeDifference.ParentId | TreeNodeDifference.Position, value.Value);
        }
Ejemplo n.º 4
0
        public void FlagEnum_Create_Array_Params()
        {
            var value = FlagEnum.Create(TreeNodeDifference.ParentId, TreeNodeDifference.Position);

            Assert.AreEqual(TreeNodeDifference.ParentId | TreeNodeDifference.Position, value.Value);
        }
Ejemplo n.º 5
0
        public void FlagEnum_Create_SingleValue()
        {
            var value = FlagEnum.Create(TreeNodeDifference.ParentId);

            Assert.AreEqual(TreeNodeDifference.ParentId, value.Value);
        }