コード例 #1
0
        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);
        }
コード例 #2
0
 public string GetFlagsEnum(FlagsEnum id)
 {
     ThrowIfInsideThrowsController();
     return(id.ToString());
 }
コード例 #3
0
 public string GetFlagValuesAsString(FlagsEnum flags)
 {
     return(flags.ToString());
 }
コード例 #4
0
 public string GetFlagsEnum(FlagsEnum id)
 {
     ThrowIfInsideThrowsController();
     return id.ToString();
 }
コード例 #5
0
 public string GetFlagValuesAsString(FlagsEnum flags)
 {
     return flags.ToString();
 }