示例#1
0
        public void CompareFullCaseWithItself()
        {
            //SETUP
            using (var context = new Issue19FullCaseDbContext(_fullCaseOptions))
            {
                var comparer = new CompareEfSql();

                //ATTEMPT
                var hasErrors = comparer.CompareEfWithDb(context);

                //VERIFY
                hasErrors.ShouldBeFalse(comparer.GetAllErrors);
            }
        }
示例#2
0
        public Issue019Tests()
        {
            _fullCaseConnectionString  = this.GetUniqueDatabaseConnectionString("FullCase");
            _lowerCaseConnectionString = this.GetUniqueDatabaseConnectionString("LowerCase");
            var fullOptionsBuilder = new DbContextOptionsBuilder <Issue19FullCaseDbContext>();

            fullOptionsBuilder.UseSqlServer(_fullCaseConnectionString);
            _fullCaseOptions = fullOptionsBuilder.Options;
            var lowerOptionsBuilder = new DbContextOptionsBuilder <Issue19LowerCaseDbContext>();

            lowerOptionsBuilder.UseSqlServer(_lowerCaseConnectionString);
            _lowerCaseOptions = lowerOptionsBuilder.Options;

            //Ensure the databases exist
            using (var context = new Issue19FullCaseDbContext(_fullCaseOptions))
            {
                context.Database.EnsureCreated();
            }
            using (var context = new Issue19LowerCaseDbContext(_lowerCaseOptions))
            {
                context.Database.EnsureCreated();
            }
        }