Esempio n. 1
0
 public static void AssertEqualProperties(IComplexConfig x, IComplexConfig y)
 {
     foreach (var p in typeof(ITestConfiguration).GetProperties())
     {
         Assert.AreEqual(p.GetValue(y), p.GetValue(x), "Property " + p.Name);
     }
 }
Esempio n. 2
0
        public static bool AreEqualAllProperties(IComplexConfig x, IComplexConfig y)
        {
            var equals = true;

            foreach (var p in typeof(ITestConfiguration).GetProperties())
            {
                equals = equals && p.GetValue(y).Equals(p.GetValue(x));
            }
            return(equals);
        }
Esempio n. 3
0
 public static void IsNotDefault(IComplexConfig cfg, string message = "Configuration is not in default state")
 => Assert.IsFalse(AreEqualAllProperties(cfg, new ComplexConfig()), message);
Esempio n. 4
0
 public static void IsDefault(IComplexConfig cfg)
 => AssertEqualProperties(cfg, new ComplexConfig());