예제 #1
0
        public static void AreEqual <T>(HashSet <T> first, HashSet <T> second, string message, [CallerMemberName] string methodname = null)
        {
            UnitTestInfo testInfo = new UnitTestInfo();

            if (first.SetEquals(second))
            {
                testInfo.DidTestPass = true;
            }
            else
            {
                testInfo.DidTestPass        = false;
                testInfo.TestFailureMessage = message;
            }
            testInfo.MethodName = methodname;
            TestResults.Add(testInfo);
        }
예제 #2
0
        public static void AreEqual(object first, object second, string message, [CallerMemberName] string methodName = null)
        {
            var testInfo = new UnitTestInfo();

            if (first.Equals(second))
            {
                testInfo.DidTestPass = true;
            }
            else
            {
                testInfo.DidTestPass        = false;
                testInfo.TestFailureMessage = message;
            }
            testInfo.MethodName = methodName;
            TestResults.Add(testInfo);
        }