public void FlagsInequality(FlagsEnum flags1, FlagsEnum flags2) { var a1 = new A { Flags = flags1 }; var a2 = new A { Flags = flags2 }; var comparer = new Comparer <A>(); var isEqual = comparer.Compare(a1, a2, out var differencesEnum); var differences = differencesEnum.ToList(); Assert.IsFalse(isEqual); CollectionAssert.IsNotEmpty(differences); Assert.AreEqual(1, differences.Count); Assert.AreEqual("Flags", differences.First().MemberPath); Assert.AreEqual(flags1.ToString(), differences.First().Value1); Assert.AreEqual(flags2.ToString(), differences.First().Value2); }
public string GetFlagsEnum(FlagsEnum id) { ThrowIfInsideThrowsController(); return(id.ToString()); }
public string GetFlagValuesAsString(FlagsEnum flags) { return(flags.ToString()); }
public string GetFlagsEnum(FlagsEnum id) { ThrowIfInsideThrowsController(); return id.ToString(); }
public string GetFlagValuesAsString(FlagsEnum flags) { return flags.ToString(); }