@@ -51,10 +51,10 @@ public async Task Should_write_and_read_enums_and_value_types()
5151 ] ,
5252 } ;
5353 _ctx . Add ( entity ) ;
54- await _ctx . SaveChangesAsync ( ) ;
54+ await _ctx . SaveChangesAsync ( TestContext . Current . CancellationToken ) ;
5555
5656 _ctx . ChangeTracker . Clear ( ) ;
57- ( await _ctx . TestEntities_with_Enum_and_ValueObjects . SingleAsync ( ) )
57+ ( await _ctx . TestEntities_with_Enum_and_ValueObjects . SingleAsync ( TestContext . Current . CancellationToken ) )
5858 . Should ( ) . BeEquivalentTo ( entity ) ;
5959 }
6060
@@ -70,7 +70,7 @@ public async Task Should_use_ctor_of_value_types_instead_of_factory_because_DB_i
7070 TestComplexValueObject_ObjectFactory_and_Constructor = TestComplexValueObject_ObjectFactory_and_Constructor . Create ( "value 3" , "value 4" ) ,
7171 } ;
7272 _ctx . Add ( entity ) ;
73- await _ctx . SaveChangesAsync ( ) ;
73+ await _ctx . SaveChangesAsync ( TestContext . Current . CancellationToken ) ;
7474
7575 await using var command = _ctx . Database . GetDbConnection ( ) . CreateCommand ( ) ;
7676 command . CommandText = @"
@@ -80,10 +80,10 @@ UPDATE TestEntities_with_Enum_and_ValueObjects
8080 Boundary_Lower = 30,
8181 TestComplexValueObject_ObjectFactory_and_Constructor = ''
8282" ;
83- await command . ExecuteNonQueryAsync ( ) ;
83+ await command . ExecuteNonQueryAsync ( TestContext . Current . CancellationToken ) ;
8484
8585 _ctx . ChangeTracker . Clear ( ) ;
86- var loadedEntity = await _ctx . TestEntities_with_Enum_and_ValueObjects . SingleAsync ( ) ;
86+ var loadedEntity = await _ctx . TestEntities_with_Enum_and_ValueObjects . SingleAsync ( TestContext . Current . CancellationToken ) ;
8787 loadedEntity . StringBasedStructValueObject . Property . Should ( ) . Be ( String . Empty ) ;
8888 loadedEntity . Boundary . Lower . Should ( ) . Be ( 30 ) ;
8989 loadedEntity . Boundary . Upper . Should ( ) . Be ( 20 ) ;
@@ -117,7 +117,7 @@ await _ctx.TestEntities_with_Enum_and_ValueObjects
117117 && e . IntBasedStructValueObject == nullableInt16
118118 && e . IntBasedStructValueObject == deci
119119 && e . IntBasedStructValueObject == nullableDecimal )
120- . ToListAsync ( ) ;
120+ . ToListAsync ( TestContext . Current . CancellationToken ) ;
121121 }
122122
123123 [ Fact ]
@@ -128,11 +128,11 @@ public async Task Should_roundtrip_complex_value_object_with_complex_property()
128128 new TestComplexType { TestEnum = SmartEnum_StringBased . Item1 } ) ;
129129
130130 _ctx . Add ( entity ) ;
131- await _ctx . SaveChangesAsync ( ) ;
131+ await _ctx . SaveChangesAsync ( TestContext . Current . CancellationToken ) ;
132132
133133 _ctx . ChangeTracker . Clear ( ) ;
134134
135- var loadedEntity = await _ctx . ComplexValueObject_with_ComplexType . SingleAsync ( ) ;
135+ var loadedEntity = await _ctx . ComplexValueObject_with_ComplexType . SingleAsync ( TestContext . Current . CancellationToken ) ;
136136 loadedEntity . Id . Should ( ) . Be ( entity . Id ) ;
137137 loadedEntity . TestComplexType . Should ( ) . BeEquivalentTo ( entity . TestComplexType ) ;
138138 }
0 commit comments