예제 #1
0
            public TestFailure InvokeWithValidation()
            {
                var ec = ExpectationCommand.Of(() => (T)null);
                var m  = ((ITestMatcherValidations)_data.Matcher).AllowingNullActualValue();

                return(ec.Should((ITestMatcher <T>)m));
            }
예제 #2
0
        void ITestCaseFilter.RunTest(TestExecutionContext testContext, Action <TestExecutionContext> next)
        {
            var    matcher = _provider.CreateMatcher(testContext);
            Action actual  = () => next(testContext);
            string message = TestMatcherFactory.GetMessage(_provider);

            new Expectation(ExpectationCommand.TestCode(actual, false, null, AsserterBehavior.Default)).Like(matcher, message, null);
        }
예제 #3
0
 static Expectation <string> CreateData1(string data)
 {
     return(new Expectation <string>(ExpectationCommand.Of(() => data)));
 }
예제 #4
0
 internal SatisfactionExpectation(ExpectationCommand <Unit> cmd)
 {
     _cmd = cmd;
 }
예제 #5
0
            public TestFailure Invoke()
            {
                var ec = ExpectationCommand.Of(() => (T)null);

                return(ec.Should((ITestMatcher <T>)_data.Matcher));
            }
 static Expectation <IEnumerable <string> > CreateData1(IEnumerable <string> data)
 {
     return(new Expectation <IEnumerable <string> >(ExpectationCommand.Of(() => data)));
 }
 static IEnumerableExpectation <int> CreateData1(IEnumerable <int> data)
 {
     return(new EnumerableExpectation <int>(ExpectationCommand.Of(() => data)));
 }
 static IEnumerableExpectation CreateData(IEnumerable data)
 {
     return(new EnumerableExpectation(ExpectationCommand.Of(() => data)));
 }