public void GetComponents() { var comparer = HashSet <Enum> .CreateSetComparer(); Assert.IsTrue(comparer.Equals(_nonFlagsSigned.GetComponents(NonFlagsSigned.Variant1).ToHashSet(), new HashSet <Enum> { NonFlagsSigned.Variant1 })); }
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 })); }