Beispiel #1
0
        public static void AssertAreEqual <T>(T expected, T actual, PartFlags flags, AssertArgs args, string partName)
        {
            if (flags.IsSet(PartFlags.Dynamic))
            {
                if (expected == null)
                {
                    Assert.AreEqual(null, actual);
                    return;
                }
                Assert.AreEqual(expected.GetType(), actual.GetType(), partName);

                var tester = BarfSerializers.GetTester(expected.GetType(), flags & ~PartFlags.Dynamic);
                tester.AssertAreEqual(expected, actual, args);
            }
            else
            {
                var tester = BarfSerializers.GetTester <T>(flags);
                tester.AssertAreEqual(expected, actual, args);
            }
        }
 public void AssertAreEqual(T expected, T actual, AssertArgs args)
 {
     _assert.Value(expected, actual, args);
 }
 public void AssertAreEqual(object expected, object actual, AssertArgs args)
 {
     AssertAreEqual((T)expected, (T)actual, args);
 }