Skip to content

WIP

WIP #1018

GitHub Actions / Test report Basic failed Aug 11, 2023 in 0s

Test report Basic ❌

Tests failed

❌ test-results-Basic.xml

266 tests were completed in 1s with 265 passed, 1 failed and 0 skipped.

Test suite Passed Failed Skipped Time
grate.unittests.Basic.CommandLineParsing.Basic_CommandLineParsing 86✅ 156ms
grate.unittests.Basic.CommandLineParsing.FolderConfiguration_ 4✅ 15ms
grate.unittests.Basic.CommandLineParsing.FoldersCommand_ 20✅ 6ms
grate.unittests.Basic.GrateConfiguration_ 3✅ 46ms
grate.unittests.Basic.Infrastructure.FileSystem_ 4✅ 4ms
grate.unittests.Basic.Infrastructure.FolderConfiguration.Fully_Customised_Folders 5✅ 3ms
grate.unittests.Basic.Infrastructure.FolderConfiguration.KnownFolders_CustomNames 15✅ 1ms
grate.unittests.Basic.Infrastructure.FolderConfiguration.KnownFolders_Default 15✅ 1ms
grate.unittests.Basic.Infrastructure.GrateEnvironment_ 5✅ 1ms
grate.unittests.Basic.Infrastructure.HashGenerator_ 1✅ 9ms
grate.unittests.Basic.Infrastructure.MariaDB.MariaDbDatabase_ 2✅ 44ms
grate.unittests.Basic.Infrastructure.Oracle.Statement_Splitting.BatchSplitterReplacer_+should_not_replace_on 21✅ 7ms
grate.unittests.Basic.Infrastructure.Oracle.Statement_Splitting.BatchSplitterReplacer_+should_replace_on 21✅ 3ms
grate.unittests.Basic.Infrastructure.Oracle.Statement_Splitting.StatementSplitter_ 1✅ 1ms
grate.unittests.Basic.Infrastructure.PostgreSQL.Statement_Splitting.StatementSplitter_ 6✅ 1❌ 97ms
grate.unittests.Basic.Infrastructure.SqlServer.SqlServerDatabase_ 2✅ 3ms
grate.unittests.Basic.Infrastructure.SqlServer.Statement_Splitting.BatchSplitterReplacer_+should_not_replace_on 23✅ 5ms
grate.unittests.Basic.Infrastructure.SqlServer.Statement_Splitting.BatchSplitterReplacer_+should_replace_on 21✅ 3ms
grate.unittests.Basic.Infrastructure.SqlServer.Statement_Splitting.StatementSplitter_ 1✅ 0ms
grate.unittests.Basic.Infrastructure.TokenReplacerTests 7✅ 10ms
grate.unittests.Basic.Migration 2✅ 72ms

✅ grate.unittests.Basic.CommandLineParsing.Basic_CommandLineParsing

✅ AccessToken("--accesstoken ")
✅ AdminCommandTimeout("--admincommandtimeout=")
✅ AdminCommandTimeout("-cta ")
✅ AdminConnectionString("--adminconnectionstring=")
✅ AdminConnectionString("--adminconnstring=")
✅ AdminConnectionString("-a ")
✅ AdminConnectionString("-acs ")
✅ AdminConnectionString("-acs=")
✅ AdminConnectionString("-csa ")
✅ AdminConnectionString("-csa=")
✅ Baseline("--baseline",True)
✅ Baseline("",False)
✅ CommandTimeout("--commandtimeout=")
✅ CommandTimeout("-ct ")
✅ ConnectionString("--connectionstring=")
✅ ConnectionString("--connstring=")
✅ ConnectionString("-c ")
✅ ConnectionString("-cs ")
✅ CreateDatabase("--create=false",False)
✅ CreateDatabase("--createdatabase=false",False)
✅ CreateDatabase("",True)
✅ DefaultAdminConnectionString(mariadb)
✅ DefaultAdminConnectionString(oracle)
✅ DefaultAdminConnectionString(postgresql)
✅ DefaultAdminConnectionString(sqlite)
✅ DefaultAdminConnectionString(sqlserver)
✅ DisableTokenReplacement("--disabletokenreplacement",True)
✅ DisableTokenReplacement("--disabletokens",True)
✅ DisableTokenReplacement("",False)
✅ DoNotStoreScriptsRunText("--donotstorescriptsruntext",True)
✅ DoNotStoreScriptsRunText("",False)
✅ DryRun("--dryrun",True)
✅ DryRun("",False)
✅ Environment("--env KASHMIR","KASHMIR")
✅ Environment("--environment JALLA","JALLA")
✅ IgnoreDirectoryNames("--ignoredirectorynames",True)
✅ IgnoreDirectoryNames("--searchallinsteadoftraverse",True)
✅ IgnoreDirectoryNames("--searchallsubdirectoriesinsteadoftraverse",True)
✅ IgnoreDirectoryNames("",False)
✅ OutputPath("--output ")
✅ OutputPath("--output=")
✅ OutputPath("--outputPath ")
✅ OutputPath("--outputPath=")
✅ OutputPath("-o ")
✅ ParserIsConfiguredCorrectly()
✅ RunAllAnyTimeScripts("--forceanytimescripts",True)
✅ RunAllAnyTimeScripts("--runallanytimescripts",True)
✅ RunAllAnyTimeScripts("",False)
✅ Schema("--sc RoundhousE","RoundhousE")
✅ Schema("--schema SquareHouse","SquareHouse")
✅ Schema("--schemaname TrianglehousE","TrianglehousE")
✅ Schema("","grate")
✅ Silent("--ni false",False)
✅ Silent("--ni true",True)
✅ Silent("--ni",True)
✅ Silent("--noninteractive false",False)
✅ Silent("--noninteractive true",True)
✅ Silent("--noninteractive",True)
✅ Silent("--silent false",False)
✅ Silent("--silent true",True)
✅ Silent("--silent",True)
✅ Silent("",False)
✅ SqlFilesDirectory("--files=")
✅ SqlFilesDirectory("--sqlfilesdirectory=")
✅ SqlFilesDirectory("-f ")
✅ TestDatabaseType("--dbt=mariadb",mariadb)
✅ TestDatabaseType("--dbt=postgresql",postgresql)
✅ TestDatabaseType("",sqlserver)
✅ UserTokens("--silent",0)
✅ UserTokens("--ut=token=value --usertokens=abc=123",2)
✅ UserTokens("--ut=token=value",1)
✅ Version("--version ")
✅ Version("--version=")
✅ WarnAndIgnoreOnOneTimeScriptChanges("--warnandignoreononetimescriptchanges",True)
✅ WarnAndIgnoreOnOneTimeScriptChanges("",False)
✅ WarnOnOneTimeScriptChanges("--warnononetimescriptchanges",True)
✅ WarnOnOneTimeScriptChanges("-w",True)
✅ WarnOnOneTimeScriptChanges("",False)
✅ WithoutTransaction_Default
✅ WithoutTransaction("--transaction false")
✅ WithoutTransaction("--transaction=false")
✅ WithoutTransaction("--trx false")
✅ WithoutTransaction("-t false")
✅ WithTransaction("--transaction")
✅ WithTransaction("--trx")
✅ WithTransaction("-t")

✅ grate.unittests.Basic.CommandLineParsing.FolderConfiguration_

✅ Default
✅ Default_With_Overrides(--folders=up=tables, names => names with { Up = "tables" })
✅ Default_With_Overrides(--folders=up=tables;views=projections, names => names with { Up = "tables", Views = "projections"})
✅ Fully_Customised(Mostly defaults, --folders=folder1=type:Once;folder2=type:EveryTime;folder3=type:AnyTime)

✅ grate.unittests.Basic.CommandLineParsing.FoldersCommand_

✅ Can_Parse(File - Default, with overrides, /tmp/tmpqtGPUd.tmp)
✅ Can_Parse(File - Empty file, /tmp/tmpslwkcr.tmp)
✅ Can_Parse(File - Fully customised - With only folder name, /tmp/tmpY1mAZC.tmp)
✅ Can_Parse(File - Fully customised - With only migration type, /tmp/tmpSeDYdL.tmp)
✅ Can_Parse(File - Fully customised, /tmp/tmpMRBJk9.tmp)
✅ Can_Parse(File - Fully customised, more properties, /tmp/tmpNSmMOw.tmp)
✅ Can_Parse(File - Fully customised, one folder with standard name, /tmp/tmpY2HwIe.tmp)
✅ Can_Parse(File - Fully customised, only folder names, should have defaults, /tmp/tmp0dV04Z.tmp)
✅ Can_Parse(File - Fully customised, only one folder, /tmp/tmp1MDMqG.tmp)
✅ Can_Parse(File - Fully customised, with newline separators, /tmp/tmp5rvxoG.tmp)
✅ Can_Parse(File - NonExistent file, /tmp/this/does/not/exist)
✅ Can_Parse(Text - Default, with overrides, up=blup;afterMigration=æfter)
✅ Can_Parse(Text - Fully customised - With only folder name, folderA=hello;folderB=you;folderC=fool)
✅ Can_Parse(Text - Fully customised - With only migration type, folderA=Everytime;folderB=Once;folderC=AnyTime)
✅ Can_Parse(Text - Fully customised, folder1=type:Once;folder2=type:EveryTime;folder3=type:AnyTime)
✅ Can_Parse(Text - Fully customised, more properties, folder1=path:a/sub/folder/here,type:Once,connectionType:Admin;folder2=type:EveryTime;folder3=type:AnyTime)
✅ Can_Parse(Text - Fully customised, one folder with standard name, folder1=type:Once;up=tables)
✅ Can_Parse(Text - Fully customised, only folder names, should have defaults, folder1;up)
✅ Can_Parse(Text - Fully customised, only one folder, folder1=type:Once)
✅ Can_Parse(Text - Fully customised, with newline separators, folder1=type:Once
folder2=type:EveryTime
folder3=type:AnyTime)

✅ grate.unittests.Basic.GrateConfiguration_

✅ Doesnt_include_comma_in_drop_folder
✅ Uses_ConnectionString_with_master_db_if_adminConnectionString_is_not_set_Database
✅ Uses_ConnectionString_with_master_db_if_adminConnectionString_is_not_set_Initial_Catalog

✅ grate.unittests.Basic.Infrastructure.FileSystem_

✅ Sorts_enumerated_files_on_filename_when_directory_names_are_ignored
✅ Sorts_enumerated_files_on_filename_when_no_subfolders
✅ Sorts_enumerated_files_on_filename_without_extension_when_no_subfolders
✅ Sorts_enumerated_files_on_sub_path_when_subfolders_are_used

✅ grate.unittests.Basic.Infrastructure.FolderConfiguration.Fully_Customised_Folders

✅ Has_expected_folder_configuration(Folders["procedures"], procs, AnyTime, conn: Default, tran: Default)
✅ Has_expected_folder_configuration(Folders["randomstuff"], randomstuff, AnyTime, conn: Admin, tran: Autonomous)
✅ Has_expected_folder_configuration(Folders["security"], secret, AnyTime, conn: Default, tran: Default)
✅ Has_expected_folder_configuration(Folders["structure"], structure, Once, conn: Default, tran: Default)
✅ Returns_folders_in_Expected_Order

✅ grate.unittests.Basic.Infrastructure.FolderConfiguration.KnownFolders_CustomNames

✅ Has_expected_folder_configuration(Folders[AfterMigration], afterMigrationaJItEMXb, EveryTime, conn: Default, tran: Autonomous)
✅ Has_expected_folder_configuration(Folders[AlterDatabase], alterDatabasecIvJUZxp, AnyTime, conn: Admin, tran: Autonomous)
✅ Has_expected_folder_configuration(Folders[BeforeMigration], beforeMigrationkuxzpDuM, EveryTime, conn: Default, tran: Autonomous)
✅ Has_expected_folder_configuration(Folders[Functions], functionsjRLpupEf, AnyTime, conn: Default, tran: Default)
✅ Has_expected_folder_configuration(Folders[Indexes], indexeswHQAJVRy, AnyTime, conn: Default, tran: Default)
✅ Has_expected_folder_configuration(Folders[Permissions], permissionsbkpNcDdV, EveryTime, conn: Default, tran: Autonomous)
✅ Has_expected_folder_configuration(Folders[RunAfterCreateDatabase], runAfterCreateDatabaserkvCCCuJ, AnyTime, conn: Default, tran: Default)
✅ Has_expected_folder_configuration(Folders[RunAfterOtherAnyTimeScripts], runAfterOtherAnyTimeScriptsHbWPJnYd, AnyTime, conn: Default, tran: Default)
✅ Has_expected_folder_configuration(Folders[RunBeforeUp], runBeforeUpKfrTljZV, AnyTime, conn: Default, tran: Default)
✅ Has_expected_folder_configuration(Folders[RunFirstAfterUp], runFirstAfterUpWtQDUfPW, AnyTime, conn: Default, tran: Default)
✅ Has_expected_folder_configuration(Folders[Sprocs], sprocsFVyQWfHe, AnyTime, conn: Default, tran: Default)
✅ Has_expected_folder_configuration(Folders[Triggers], triggersPDEODhsb, AnyTime, conn: Default, tran: Default)
✅ Has_expected_folder_configuration(Folders[Up], upskHtQJKf, Once, conn: Default, tran: Default)
✅ Has_expected_folder_configuration(Folders[Views], viewsFXAQbXph, AnyTime, conn: Default, tran: Default)
✅ Returns_folders_in_same_order_as_default

✅ grate.unittests.Basic.Infrastructure.FolderConfiguration.KnownFolders_Default

✅ Has_expected_folder_configuration(Folders[AfterMigration], afterMigration, EveryTime, conn: Default, tran: Autonomous)
✅ Has_expected_folder_configuration(Folders[AlterDatabase], alterDatabase, AnyTime, conn: Admin, tran: Autonomous)
✅ Has_expected_folder_configuration(Folders[BeforeMigration], beforeMigration, EveryTime, conn: Default, tran: Autonomous)
✅ Has_expected_folder_configuration(Folders[Functions], functions, AnyTime, conn: Default, tran: Default)
✅ Has_expected_folder_configuration(Folders[Indexes], indexes, AnyTime, conn: Default, tran: Default)
✅ Has_expected_folder_configuration(Folders[Permissions], permissions, EveryTime, conn: Default, tran: Autonomous)
✅ Has_expected_folder_configuration(Folders[RunAfterCreateDatabase], runAfterCreateDatabase, AnyTime, conn: Default, tran: Default)
✅ Has_expected_folder_configuration(Folders[RunAfterOtherAnyTimeScripts], runAfterOtherAnyTimeScripts, AnyTime, conn: Default, tran: Default)
✅ Has_expected_folder_configuration(Folders[RunBeforeUp], runBeforeUp, AnyTime, conn: Default, tran: Default)
✅ Has_expected_folder_configuration(Folders[RunFirstAfterUp], runFirstAfterUp, AnyTime, conn: Default, tran: Default)
✅ Has_expected_folder_configuration(Folders[Sprocs], sprocs, AnyTime, conn: Default, tran: Default)
✅ Has_expected_folder_configuration(Folders[Triggers], triggers, AnyTime, conn: Default, tran: Default)
✅ Has_expected_folder_configuration(Folders[Up], up, Once, conn: Default, tran: Default)
✅ Has_expected_folder_configuration(Folders[Views], views, AnyTime, conn: Default, tran: Default)
✅ Returns_folders_in_current_order

✅ grate.unittests.Basic.Infrastructure.GrateEnvironment_

✅ Always_runs_non_environment_files
✅ Detects_environment_marker_in_end_of_filename
✅ Detects_environment_marker_in_middle_of_filename
✅ Detects_environment_marker_in_start_of_filename
✅ Does_not_run_for_other_environments

✅ grate.unittests.Basic.Infrastructure.HashGenerator_

✅ Generates_the_correct_hash

✅ grate.unittests.Basic.Infrastructure.MariaDB.MariaDbDatabase_

✅ Disables_pipelining_if_not_explicitly_set_in_connection_string
✅ Leaves_pipelining_as_configured_if_set_explicitly_in_connection_string

✅ grate.unittests.Basic.Infrastructure.Oracle.Statement_Splitting.BatchSplitterReplacer_+should_not_replace_on

✅ slash_inside_of_comments
✅ slash_inside_of_comments_with_a_line_break
✅ slash_inside_of_comments_with_symbols_after_on_different_lines
✅ slash_inside_of_comments_with_words_before
✅ slash_inside_of_comments_with_words_before_and_after_on_different_lines
✅ slash_inside_of_comments_with_words_before_on_a_different_line
✅ slash_when_between_tick_marks
✅ slash_when_between_tick_marks_with_symbols_and_words_after
✅ slash_when_between_tick_marks_with_symbols_and_words_before
✅ slash_when_between_tick_marks_with_symbols_and_words_before_ending_on_same_line
✅ slash_when_slash_is_the_last_part_of_the_last_word_on_a_line
✅ slash_with_double_dash_comment_and_space_starting_line
✅ slash_with_double_dash_comment_and_space_starting_line_and_symbols_after_slash
✅ slash_with_double_dash_comment_and_space_starting_line_and_words_after_slash
✅ slash_with_double_dash_comment_and_tab_starting_line
✅ slash_with_double_dash_comment_and_tab_starting_line_and_symbols_after_slash
✅ slash_with_double_dash_comment_and_tab_starting_line_and_words_after_slash
✅ slash_with_double_dash_comment_starting_line
✅ slash_with_double_dash_comment_starting_line_with_symbols_before_slash
✅ slash_with_double_dash_comment_starting_line_with_words_and_symbols_before_slash
✅ slash_with_double_dash_comment_starting_line_with_words_before_slash

✅ grate.unittests.Basic.Infrastructure.Oracle.Statement_Splitting.BatchSplitterReplacer_+should_replace_on

✅ full_statement_without_issue
✅ slash_after_double_dash_comment_with_single_quote_and_single_quote_after_slash
✅ slash_by_itself
✅ slash_on_its_own_line
✅ slash_starting_file
✅ slash_with_comment_after
✅ slash_with_new_line
✅ slash_with_new_line_after_double_dash_comments_and_symbols
✅ slash_with_no_line_terminator
✅ slash_with_one_new_line_after_double_dash_comments
✅ slash_with_one_new_line_after_double_dash_comments_and_words
✅ slash_with_semicolon_directly_after
✅ slash_with_space
✅ slash_with_symbols_and_words_before
✅ slash_with_tab
✅ slash_with_words_after_on_the_same_line
✅ slash_with_words_after_on_the_same_line_including_symbols
✅ slash_with_words_and_symbols_before
✅ slash_with_words_before
✅ slash_with_words_before_and_after_on_the_same_line
✅ slash_with_words_before_and_after_on_the_same_line_including_symbols

✅ grate.unittests.Basic.Infrastructure.Oracle.Statement_Splitting.StatementSplitter_

✅ Splits_and_removes_GO_statements

❌ grate.unittests.Basic.Infrastructure.PostgreSQL.Statement_Splitting.StatementSplitter_

✅ Ignores_semicolon_in_single_quotes_when_there_is_no_other_semicolon
❌ Ignores_semicolon_in_strings_with_directly_appended_operator
	Expected collection to contain 1 item(s), but found 2: {"
	CREATE VIEW wgs.wgs_pages_branches AS
	 SELECT branches.instrumentid,
	    branches.plabel AS from_plabel,
	        CASE
	            WHEN (NOT (branches.branch ~~* '%?%'::text)) THEN "substring"(branches.branch, ("position"(branches.branch, '->'::text) + 3), length(branches.branch))
	            ELSE NULL::text
	        END AS to_plabel,
	        CASE
	            WHEN (branches.branch ~~* '?%'::text) THEN branches.branch
	            WHEN (branches.branch ~~* '%?%'::text) THEN "substring"(branches.branch, ("position"(branches.branch, '->'::text) + 2), length(branches.branch))
	            ELSE NULL::text
	        END AS to_other,
	    branches.rank AS condition_rank,
	        CASE
	            WHEN ("substring"(branches.branch, 0, "position"(branches.branch, '->'::text)) ~~* 'ELSE'::text) THEN 'TRUE'::text
	            ELSE "substring"(branches.branch, 0, "position"(branches.branch, '->'::text))
	        END AS condition
	   FROM ( SELECT foo.instrumentid,
	            foo.plabel,
	            foo.branch,
	            row_number() OVER (PARTITION BY foo.instrumentid, foo.plabel ORDER BY foo.rankgroup) AS rank
	           FROM ( SELECT wgs_pages.instrumentid,
	                    wgs_pages.plabel,
	                    unnest(string_to_array(wgs_pages.nextbranch, '", "'::text)) AS branch,
	                    row_number() OVER (ORDER BY wgs_pages.instrumentid, wgs_pages.plabel) AS rankgroup
	                   FROM wgs.wgs_pages) foo) branches"}.
✅ Ignores_semicolons_in_backslash_escaped_strings
✅ Ignores_semicolons_in_dollar_quoted_strings("$$")
✅ Ignores_semicolons_in_dollar_quoted_strings("$sometag$")
✅ Splits_and_removes_semicolons
✅ Splits_on_semicolon_after_single_quotes_when_there_is_another_semicolon_in_the_quote

✅ grate.unittests.Basic.Infrastructure.SqlServer.SqlServerDatabase_

✅ Disables_pooling_if_not_explicitly_set_in_connection_string
✅ Leaves_pooling_as_configured_if_set_explicitly_in_connection_string

✅ grate.unittests.Basic.Infrastructure.SqlServer.Statement_Splitting.BatchSplitterReplacer_+should_not_replace_on

✅ g
✅ go_inside_of_comments
✅ go_inside_of_comments_with_a_line_break
✅ go_inside_of_comments_with_symbols_after_on_different_lines
✅ go_inside_of_comments_with_words_before
✅ go_inside_of_comments_with_words_before_and_after_on_different_lines
✅ go_inside_of_comments_with_words_before_on_a_different_line
✅ go_when_between_tick_marks
✅ go_when_between_tick_marks_with_symbols_and_words_after
✅ go_when_between_tick_marks_with_symbols_and_words_before
✅ go_when_between_tick_marks_with_symbols_and_words_before_ending_on_same_line
✅ go_when_go_is_the_last_part_of_the_last_word_on_a_line
✅ go_with_double_dash_comment_and_space_starting_line
✅ go_with_double_dash_comment_and_space_starting_line_and_symbols_after_go
✅ go_with_double_dash_comment_and_space_starting_line_and_words_after_go
✅ go_with_double_dash_comment_and_tab_starting_line
✅ go_with_double_dash_comment_and_tab_starting_line_and_symbols_after_go
✅ go_with_double_dash_comment_and_tab_starting_line_and_words_after_go
✅ go_with_double_dash_comment_starting_line
✅ go_with_double_dash_comment_starting_line_with_symbols_before_go
✅ go_with_double_dash_comment_starting_line_with_words_and_symbols_before_go
✅ go_with_double_dash_comment_starting_line_with_words_before_go
✅ o

✅ grate.unittests.Basic.Infrastructure.SqlServer.Statement_Splitting.BatchSplitterReplacer_+should_replace_on

✅ full_statement_without_issue
✅ go_after_double_dash_comment_with_single_quote_and_single_quote_after_go
✅ go_by_itself
✅ go_on_its_own_line
✅ go_starting_file
✅ go_with_comment_after
✅ go_with_new_line
✅ go_with_new_line_after_double_dash_comments_and_symbols
✅ go_with_no_line_terminator
✅ go_with_on_new_line_after_double_dash_comments
✅ go_with_on_new_line_after_double_dash_comments_and_words
✅ go_with_semicolon_directly_after
✅ go_with_space
✅ go_with_symbols_and_words_before
✅ go_with_tab
✅ go_with_words_after_on_the_same_line
✅ go_with_words_after_on_the_same_line_including_symbols
✅ go_with_words_and_symbols_before
✅ go_with_words_before
✅ go_with_words_before_and_after_on_the_same_line
✅ go_with_words_before_and_after_on_the_same_line_including_symbols

✅ grate.unittests.Basic.Infrastructure.SqlServer.Statement_Splitting.StatementSplitter_

✅ Splits_and_removes_GO_statements

✅ grate.unittests.Basic.Infrastructure.TokenReplacerTests

✅ EnsureConfigMakesItToTokens
✅ EnsureDbMakesItToTokens
✅ EnsureEmptyStringIsLeftEmpty("")
✅ EnsureEmptyStringIsLeftEmpty(null)
✅ EnsureTokensAreReplaced
✅ EnsureUnknownTokenIsIgnored
✅ EnsureUserTokenParserWorks

✅ grate.unittests.Basic.Migration

✅ Does_not_output_no_sql_run_in_dryrun_mode
✅ Outputs_no_sql_run_in_live_mode

Annotations

Check failure on line 137 in grate.unittests/Basic/Infrastructure/PostgreSQL/Statement_Splitting/StatementSplitter_.cs

See this annotation in the file changed.

@github-actions github-actions / Test report Basic

grate.unittests.Basic.Infrastructure.PostgreSQL.Statement_Splitting.StatementSplitter_ ► Ignores_semicolon_in_strings_with_directly_appended_operator

Failed test found in:
  test-results-Basic.xml
Error:
  Expected collection to contain 1 item(s), but found 2: {"
  CREATE VIEW wgs.wgs_pages_branches AS
   SELECT branches.instrumentid,
      branches.plabel AS from_plabel,
          CASE
              WHEN (NOT (branches.branch ~~* '%?%'::text)) THEN "substring"(branches.branch, ("position"(branches.branch, '->'::text) + 3), length(branches.branch))
              ELSE NULL::text
          END AS to_plabel,
          CASE
              WHEN (branches.branch ~~* '?%'::text) THEN branches.branch
              WHEN (branches.branch ~~* '%?%'::text) THEN "substring"(branches.branch, ("position"(branches.branch, '->'::text) + 2), length(branches.branch))
              ELSE NULL::text
          END AS to_other,
      branches.rank AS condition_rank,
          CASE
              WHEN ("substring"(branches.branch, 0, "position"(branches.branch, '->'::text)) ~~* 'ELSE'::text) THEN 'TRUE'::text
              ELSE "substring"(branches.branch, 0, "position"(branches.branch, '->'::text))
          END AS condition
     FROM ( SELECT foo.instrumentid,
              foo.plabel,
              foo.branch,
              row_number() OVER (PARTITION BY foo.instrumentid, foo.plabel ORDER BY foo.rankgroup) AS rank
             FROM ( SELECT wgs_pages.instrumentid,
                      wgs_pages.plabel,
                      unnest(string_to_array(wgs_pages.nextbranch, '", "'::text)) AS branch,
                      row_number() OVER (ORDER BY wgs_pages.instrumentid, wgs_pages.plabel) AS rankgroup
                     FROM wgs.wgs_pages) foo) branches"}.
Raw output
Expected collection to contain 1 item(s), but found 2: {"
CREATE VIEW wgs.wgs_pages_branches AS
 SELECT branches.instrumentid,
    branches.plabel AS from_plabel,
        CASE
            WHEN (NOT (branches.branch ~~* '%?%'::text)) THEN "substring"(branches.branch, ("position"(branches.branch, '->'::text) + 3), length(branches.branch))
            ELSE NULL::text
        END AS to_plabel,
        CASE
            WHEN (branches.branch ~~* '?%'::text) THEN branches.branch
            WHEN (branches.branch ~~* '%?%'::text) THEN "substring"(branches.branch, ("position"(branches.branch, '->'::text) + 2), length(branches.branch))
            ELSE NULL::text
        END AS to_other,
    branches.rank AS condition_rank,
        CASE
            WHEN ("substring"(branches.branch, 0, "position"(branches.branch, '->'::text)) ~~* 'ELSE'::text) THEN 'TRUE'::text
            ELSE "substring"(branches.branch, 0, "position"(branches.branch, '->'::text))
        END AS condition
   FROM ( SELECT foo.instrumentid,
            foo.plabel,
            foo.branch,
            row_number() OVER (PARTITION BY foo.instrumentid, foo.plabel ORDER BY foo.rankgroup) AS rank
           FROM ( SELECT wgs_pages.instrumentid,
                    wgs_pages.plabel,
                    unnest(string_to_array(wgs_pages.nextbranch, '", "'::text)) AS branch,
                    row_number() OVER (ORDER BY wgs_pages.instrumentid, wgs_pages.plabel) AS rankgroup
                   FROM wgs.wgs_pages) foo) branches"}.
   at FluentAssertions.Execution.LateBoundTestFramework.Throw(String message)
   at FluentAssertions.Execution.TestFrameworkProvider.Throw(String message)
   at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message)
   at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
   at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
   at FluentAssertions.Execution.AssertionScope.FailWith(String message, Object[] args)
   at FluentAssertions.Collections.GenericCollectionAssertions`3.HaveCount(Int32 expected, String because, Object[] becauseArgs)
   at grate.unittests.Basic.Infrastructure.PostgreSQL.Statement_Splitting.StatementSplitter_.Ignores_semicolon_in_strings_with_directly_appended_operator() in /home/runner/work/grate/grate/grate.unittests/Basic/Infrastructure/PostgreSQL/Statement_Splitting/StatementSplitter_.cs:line 137