public void Flag_And() { Assert.AreEqual(SampleFlag.None, EnumHelper.And(SampleFlag.Left, SampleFlag.Right)); Assert.AreEqual(SampleFlag.Right, EnumHelper.And(SampleFlag.LeftRight, SampleFlag.Right)); Assert.AreEqual(SampleFlag.Right, EnumHelper.And(SampleFlag.Right, SampleFlag.LeftRight)); Assert.AreEqual(SampleFlag.LeftRight, EnumHelper.And(SampleFlag.All, SampleFlag.LeftRight)); Assert.AreEqual(SampleFlag.LeftRight, EnumHelper.And(SampleFlag.All, SampleFlag.RightLeft)); }
public void Enum_And() { Assert.AreEqual(SampleEnum.None, EnumHelper.And(SampleEnum.Left, SampleEnum.Right)); Assert.AreEqual(SampleEnum.Right, EnumHelper.And(SampleEnum.LeftRight, SampleEnum.Right)); Assert.AreEqual(SampleEnum.Right, EnumHelper.And(SampleEnum.Right, SampleEnum.LeftRight)); Assert.AreEqual(SampleEnum.LeftRight, EnumHelper.And(SampleEnum.All, SampleEnum.LeftRight)); Assert.AreEqual(SampleEnum.LeftRight, EnumHelper.And(SampleEnum.All, SampleEnum.RightLeft)); }