Exemplo n.º 1
0
                public bool Matches(ITestActualEvaluation <TFrom> actualFactory)
                {
                    var      real  = TestMatcherName.FromType(_real.GetType());
                    Func <T> thunk = () => {
                        try {
                            var actual = actualFactory.Value;
                            return((T)(object)actual);
                        } catch (InvalidCastException e) {
                            throw SpecFailure.CastRequiredByMatcherFailure(e, real);
                        }
                    };

                    return(_real.Matches(TestActual.Of(thunk)));
                }