示例#1
0
        public void GetComponents()
        {
            var comparer = HashSet <Enum> .CreateSetComparer();

            Assert.IsTrue(comparer.Equals(_nonFlagsSigned.GetComponents(NonFlagsSigned.Variant1).ToHashSet(),
                                          new HashSet <Enum> {
                NonFlagsSigned.Variant1
            }));
        }
示例#2
0
        public void GetComponentsFlags()
        {
            var comparer = HashSet <Enum> .CreateSetComparer();

            Assert.IsTrue(comparer.Equals(
                              _flagsSigned.GetComponents(FlagsSigned.Variant1 | FlagsSigned.Variant2).ToHashSet(),
                              new HashSet <Enum> {
                FlagsSigned.Variant1, FlagsSigned.Variant2
            }));
        }