@@ -25,14 +25,25 @@ protected override void CheckSingleTableComparisonResult(SchemaComparisonResult
2525 {
2626 Assert . That ( comparisonResult , Is . Not . Null ) ;
2727 Assert . That ( comparisonResult . HasUnsafeActions , Is . True ) ;
28- Assert . That ( comparisonResult . UnsafeActions . Count , Is . EqualTo ( 4 ) ) ;
2928
30- var structureActions = comparisonResult . UnsafeActions . OfType < PropertyChangeAction > ( ) . ToList ( ) ;
31- Assert . That ( structureActions . Count , Is . EqualTo ( 2 ) ) ;
32- Assert . That ( structureActions
33- . All ( a => a . Path == $ "Tables/SingleTableRoot/Columns/FieldToChangeTypeRoot"
34- || a . Path == "Tables/SingleTableRoot/Columns/FieldToChangeTypeLeaf" ) ,
35- Is . True ) ;
29+ if ( StorageProviderInfo . Instance . CheckProviderIs ( StorageProvider . Sqlite ) ) {
30+ // length change is not important for SQLite
31+ Assert . That ( comparisonResult . UnsafeActions . Count , Is . EqualTo ( 3 ) ) ;
32+
33+ var structureActions = comparisonResult . UnsafeActions . OfType < PropertyChangeAction > ( ) . ToList ( ) ;
34+ Assert . That ( structureActions . Count , Is . EqualTo ( 1 ) ) ;
35+ Assert . That ( structureActions [ 0 ] . Path == $ "Tables/SingleTableRoot/Columns/FieldToChangeTypeRoot") ;
36+ }
37+ else {
38+ Assert . That ( comparisonResult . UnsafeActions . Count , Is . EqualTo ( 4 ) ) ;
39+
40+ var structureActions = comparisonResult . UnsafeActions . OfType < PropertyChangeAction > ( ) . ToList ( ) ;
41+ Assert . That ( structureActions . Count , Is . EqualTo ( 2 ) ) ;
42+ Assert . That ( structureActions
43+ . All ( a => a . Path == $ "Tables/SingleTableRoot/Columns/FieldToChangeTypeRoot"
44+ || a . Path == "Tables/SingleTableRoot/Columns/FieldToChangeTypeLeaf" ) ,
45+ Is . True ) ;
46+ }
3647
3748 var dataActions = comparisonResult . UnsafeActions . OfType < DataAction > ( ) . ToList ( ) ;
3849 Assert . That ( dataActions . Count , Is . EqualTo ( 2 ) ) ;
@@ -44,14 +55,24 @@ protected override void CheckClassTableComparisonResult(SchemaComparisonResult c
4455 {
4556 Assert . That ( comparisonResult , Is . Not . Null ) ;
4657 Assert . That ( comparisonResult . HasUnsafeActions , Is . True ) ;
47- Assert . That ( comparisonResult . UnsafeActions . Count , Is . EqualTo ( 5 ) ) ;
58+ if ( StorageProviderInfo . Instance . CheckProviderIs ( StorageProvider . Sqlite ) ) {
59+ // length change is not important for SQLite
60+ Assert . That ( comparisonResult . UnsafeActions . Count , Is . EqualTo ( 4 ) ) ;
4861
49- var structureActions = comparisonResult . UnsafeActions . OfType < PropertyChangeAction > ( ) . ToList ( ) ;
50- Assert . That ( structureActions . Count , Is . EqualTo ( 2 ) ) ;
51- Assert . That ( structureActions
52- . All ( a => a . Path == $ "Tables/ClassTableRoot/Columns/FieldToChangeTypeRoot"
53- || a . Path == "Tables/ClassTableLeaf/Columns/FieldToChangeTypeLeaf" ) ,
54- Is . True ) ;
62+ var structureActions = comparisonResult . UnsafeActions . OfType < PropertyChangeAction > ( ) . ToList ( ) ;
63+ Assert . That ( structureActions . Count , Is . EqualTo ( 1 ) ) ;
64+ Assert . That ( structureActions [ 0 ] . Path == $ "Tables/ClassTableRoot/Columns/FieldToChangeTypeRoot") ;
65+ }
66+ else {
67+ Assert . That ( comparisonResult . UnsafeActions . Count , Is . EqualTo ( 5 ) ) ;
68+
69+ var structureActions = comparisonResult . UnsafeActions . OfType < PropertyChangeAction > ( ) . ToList ( ) ;
70+ Assert . That ( structureActions . Count , Is . EqualTo ( 2 ) ) ;
71+ Assert . That ( structureActions
72+ . All ( a => a . Path == $ "Tables/ClassTableRoot/Columns/FieldToChangeTypeRoot"
73+ || a . Path == "Tables/ClassTableLeaf/Columns/FieldToChangeTypeLeaf" ) ,
74+ Is . True ) ;
75+ }
5576
5677 var dataActions = comparisonResult . UnsafeActions . OfType < DataAction > ( ) . ToList ( ) ;
5778 Assert . That ( dataActions . Count , Is . EqualTo ( 3 ) ) ;
@@ -64,14 +85,27 @@ protected override void CheckConcreteTableComparisonResult(SchemaComparisonResul
6485 {
6586 Assert . That ( comparisonResult , Is . Not . Null ) ;
6687 Assert . That ( comparisonResult . HasUnsafeActions , Is . True ) ;
67- Assert . That ( comparisonResult . UnsafeActions . Count , Is . EqualTo ( 5 ) ) ;
68-
69- var structureActions = comparisonResult . UnsafeActions . OfType < PropertyChangeAction > ( ) . ToList ( ) ;
70- Assert . That ( structureActions . Count , Is . EqualTo ( 3 ) ) ;
71- Assert . That ( structureActions
72- . All ( a => a . Path . Contains ( $ "Columns/FieldToChangeTypeRoot", StringComparison . Ordinal )
73- || a . Path . Contains ( $ "Columns/FieldToChangeTypeLeaf", StringComparison . Ordinal ) ) ,
74- Is . True ) ;
88+
89+ if ( StorageProviderInfo . Instance . CheckProviderIs ( StorageProvider . Sqlite ) ) {
90+ // length change is not important for SQLite
91+ Assert . That ( comparisonResult . UnsafeActions . Count , Is . EqualTo ( 4 ) ) ;
92+
93+ var structureActions = comparisonResult . UnsafeActions . OfType < PropertyChangeAction > ( ) . ToList ( ) ;
94+ Assert . That ( structureActions . Count , Is . EqualTo ( 2 ) ) ;
95+ Assert . That ( structureActions
96+ . All ( a => a . Path . Contains ( $ "Columns/FieldToChangeTypeRoot", StringComparison . Ordinal ) ) ,
97+ Is . True ) ;
98+ }
99+ else {
100+ Assert . That ( comparisonResult . UnsafeActions . Count , Is . EqualTo ( 5 ) ) ;
101+
102+ var structureActions = comparisonResult . UnsafeActions . OfType < PropertyChangeAction > ( ) . ToList ( ) ;
103+ Assert . That ( structureActions . Count , Is . EqualTo ( 3 ) ) ;
104+ Assert . That ( structureActions
105+ . All ( a => a . Path . Contains ( $ "Columns/FieldToChangeTypeRoot", StringComparison . Ordinal )
106+ || a . Path . Contains ( $ "Columns/FieldToChangeTypeLeaf", StringComparison . Ordinal ) ) ,
107+ Is . True ) ;
108+ }
75109
76110 var dataActions = comparisonResult . UnsafeActions . OfType < DataAction > ( ) . ToList ( ) ;
77111 Assert . That ( dataActions . Count , Is . EqualTo ( 2 ) ) ;
0 commit comments