Beispiel #1
0
        private static void Validate(IEnumerable <ProviderInfo> providerInfos, MigrationOptions options, IMigrationReport report, out string errors, out string warnings)
        {
            var validator = new Validator(providerInfos, options);
            IMigrationReporter reporter = A.Fake <IMigrationReporter>();

            A.CallTo(() => reporter.Report(A <IMigrationContext> ._)).Returns(report);
            IMigrationReporter[] reporters = new[] { reporter };
            validator.Validate(reporters, out errors, out warnings);
        }
Beispiel #2
0
        private static void Validate(MigrationOptions options, IMigrationReport report, out string errors, out string warnings)
        {
            var validator = new Validator(options);
            IMigrationReporter reporter = MockRepository.GenerateStub <IMigrationReporter>();

            reporter.Expect(r => r.Report(null)).IgnoreArguments().Return(report);
            IMigrationReporter[] reporters = new[] { reporter };
            validator.Validate(reporters, out errors, out warnings);
        }