コード例 #1
0
        public static EqualAssert AreEqual <TResult>(this AimpIntegrationTest testClass, object expected, Expression <Func <TResult> > current, string message = null)
        {
            var assert = new EqualAssert(current.GetExpressionMemberName(), current.GetExpressionValue(), expected,
                                         message);

            testClass.Asserts.Add(assert);
            return(assert);
        }
コード例 #2
0
        public static EqualAssert AreEqual(this AimpIntegrationTest testClass,
                                           object expected,
                                           object current,
                                           string fieldName = null,
                                           string message   = null)
        {
            var assert = new EqualAssert(fieldName, current, expected, message);

            try
            {
                AddAssertion(testClass, assert);
                return(assert);
            }
            finally
            {
                assert.Validate();
            }
        }