public override TestResult[] Execute(ITestMethod testMethod) { var platform = EnvironmentHelper.GetEnvironmentVariable(ENVIRONMENT_TEST_VARIABLE.YUNIQL_TEST_TARGET_PLATFORM); var testDataServiceFactory = new TestDataServiceFactory(); var testDataService = testDataServiceFactory.Create(platform); if (this.Requires.Contains(nameof(testDataService.IsAtomicDDLSupported)) && !testDataService.IsAtomicDDLSupported) { var message = $"Target database platform or version does not support atomic DDL operations. " + $"DDL operations like CREATE TABLE, CREATE VIEW are not gauranteed to be executed transactional."; return(new[] { new TestResult { Outcome = UnitTestOutcome.NotRunnable, LogOutput = message } }); } if (this.Requires.Contains(nameof(testDataService.IsSchemaSupported)) && !testDataService.IsSchemaSupported) { var message = $"Target database platform or version does not support schema within the same database."; return(new[] { new TestResult { Outcome = UnitTestOutcome.NotRunnable, LogOutput = message } }); } return(base.Execute(testMethod)); }
public void Setup() { _testConfiguration = base.ConfigureWithEmptyWorkspace(); //create test data service provider var testDataServiceFactory = new TestDataServiceFactory(); _testDataService = testDataServiceFactory.Create(_testConfiguration.Platform); //create data service factory for migration proper _traceService = new FileTraceService(); _migrationServiceFactory = new MigrationServiceFactory(_traceService); }