public void DumpMigrationsScript_WhenIncludeCommentsIsFalse_ShouldOmitComments() { //--------------- Arrange ------------------- var options = new MigrationDumperOptions() { IncludeComments = false, IncludeFluentMigratorStructures = true }; var sut = Create(options); //--------------- Assume ---------------- //--------------- Act ---------------------- var result = sut.DumpMigrationScript(GetType().Assembly); //--------------- Assert ----------------------- Expect(result).Not.To.Be.Null(); Expect(result).Not.To.Be.Empty(); Expect(result.ToLower().JoinWith(" ")).To.Contain("create table [cows]"); Expect(result).Not.To.Contain("/*"); ExpectScriptsCanSupportDatabase(result); }
public void DumpMigrationsScript_WhenIncludeFluentMigratorStructuresIsFalse_ShouldLeaveOutVersionInfoTable() { //--------------- Arrange ------------------- var options = new MigrationDumperOptions() { IncludeComments = false, IncludeFluentMigratorStructures = false }; var sut = Create(options); //--------------- Assume ---------------- //--------------- Act ---------------------- var result = sut.DumpMigrationScript(GetType().Assembly); //--------------- Assert ----------------------- Expect(result).Not.To.Be.Null(); Expect(result).Not.To.Be.Empty(); Expect(result.ToUpper().JoinWith(" ")).To.Contain("CREATE TABLE [COWS]"); Expect(result).Not.To.Contain("VersionInfo"); ExpectScriptsCanSupportDatabase(result); }