Skip to content

Commit 6402b98

Browse files
committed
add not equal timestamp assert
1 parent 67f7877 commit 6402b98

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

readme.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ var application = webApplicationBuilder.Build();
330330
application.UseDelta(
331331
getConnection: httpContext => httpContext.RequestServices.GetRequiredService<SqlConnection>());
332332
```
333-
<sup><a href='/src/DeltaTests/Usage.cs#L219-L225' title='Snippet source file'>snippet source</a> | <a href='#snippet-CustomDiscoveryConnection' title='Start of snippet'>anchor</a></sup>
333+
<sup><a href='/src/DeltaTests/Usage.cs#L220-L226' title='Snippet source file'>snippet source</a> | <a href='#snippet-CustomDiscoveryConnection' title='Start of snippet'>anchor</a></sup>
334334
<!-- endSnippet -->
335335

336336
To use custom connection and transaction discovery:
@@ -348,7 +348,7 @@ webApplication.UseDelta(
348348
return new(sqlConnection, sqlTransaction);
349349
});
350350
```
351-
<sup><a href='/src/DeltaTests/Usage.cs#L230-L242' title='Snippet source file'>snippet source</a> | <a href='#snippet-CustomDiscoveryConnectionAndTransaction' title='Start of snippet'>anchor</a></sup>
351+
<sup><a href='/src/DeltaTests/Usage.cs#L231-L243' title='Snippet source file'>snippet source</a> | <a href='#snippet-CustomDiscoveryConnectionAndTransaction' title='Start of snippet'>anchor</a></sup>
352352
<!-- endSnippet -->
353353

354354

@@ -563,7 +563,7 @@ foreach (var db in trackedDatabases)
563563
Trace.WriteLine(db);
564564
}
565565
```
566-
<sup><a href='/src/DeltaTests/Usage.cs#L117-L125' title='Snippet source file'>snippet source</a> | <a href='#snippet-GetDatabasesWithTracking' title='Start of snippet'>anchor</a></sup>
566+
<sup><a href='/src/DeltaTests/Usage.cs#L118-L126' title='Snippet source file'>snippet source</a> | <a href='#snippet-GetDatabasesWithTracking' title='Start of snippet'>anchor</a></sup>
567567
<!-- endSnippet -->
568568

569569
Uses the following SQL:
@@ -593,7 +593,7 @@ foreach (var db in trackedTables)
593593
Trace.WriteLine(db);
594594
}
595595
```
596-
<sup><a href='/src/DeltaTests/Usage.cs#L143-L151' title='Snippet source file'>snippet source</a> | <a href='#snippet-GetTrackedTables' title='Start of snippet'>anchor</a></sup>
596+
<sup><a href='/src/DeltaTests/Usage.cs#L144-L152' title='Snippet source file'>snippet source</a> | <a href='#snippet-GetTrackedTables' title='Start of snippet'>anchor</a></sup>
597597
<!-- endSnippet -->
598598

599599
Uses the following SQL:
@@ -618,7 +618,7 @@ Determine if change tracking is enabled for a database.
618618
```cs
619619
var isTrackingEnabled = await sqlConnection.IsTrackingEnabled();
620620
```
621-
<sup><a href='/src/DeltaTests/Usage.cs#L208-L212' title='Snippet source file'>snippet source</a> | <a href='#snippet-IsTrackingEnabled' title='Start of snippet'>anchor</a></sup>
621+
<sup><a href='/src/DeltaTests/Usage.cs#L209-L213' title='Snippet source file'>snippet source</a> | <a href='#snippet-IsTrackingEnabled' title='Start of snippet'>anchor</a></sup>
622622
<!-- endSnippet -->
623623

624624
Uses the following SQL:
@@ -645,7 +645,7 @@ Enable change tracking for a database.
645645
```cs
646646
await sqlConnection.EnableTracking();
647647
```
648-
<sup><a href='/src/DeltaTests/Usage.cs#L202-L206' title='Snippet source file'>snippet source</a> | <a href='#snippet-EnableTracking' title='Start of snippet'>anchor</a></sup>
648+
<sup><a href='/src/DeltaTests/Usage.cs#L203-L207' title='Snippet source file'>snippet source</a> | <a href='#snippet-EnableTracking' title='Start of snippet'>anchor</a></sup>
649649
<!-- endSnippet -->
650650

651651
Uses the following SQL:
@@ -673,7 +673,7 @@ Disable change tracking for a database and all tables within that database.
673673
```cs
674674
await sqlConnection.DisableTracking();
675675
```
676-
<sup><a href='/src/DeltaTests/Usage.cs#L187-L191' title='Snippet source file'>snippet source</a> | <a href='#snippet-DisableTracking' title='Start of snippet'>anchor</a></sup>
676+
<sup><a href='/src/DeltaTests/Usage.cs#L188-L192' title='Snippet source file'>snippet source</a> | <a href='#snippet-DisableTracking' title='Start of snippet'>anchor</a></sup>
677677
<!-- endSnippet -->
678678

679679
Uses the following SQL:
@@ -710,7 +710,7 @@ Enables change tracking for all tables listed, and disables change tracking for
710710
```cs
711711
await sqlConnection.SetTrackedTables(["Companies"]);
712712
```
713-
<sup><a href='/src/DeltaTests/Usage.cs#L137-L141' title='Snippet source file'>snippet source</a> | <a href='#snippet-SetTrackedTables' title='Start of snippet'>anchor</a></sup>
713+
<sup><a href='/src/DeltaTests/Usage.cs#L138-L142' title='Snippet source file'>snippet source</a> | <a href='#snippet-SetTrackedTables' title='Start of snippet'>anchor</a></sup>
714714
<!-- endSnippet -->
715715

716716
Uses the following SQL:

src/DeltaTests/Usage.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ insert into [Companies] (Id, Content)
105105
var newTimeStamp = await DeltaExtensions.GetLastTimeStamp(connection, null);
106106
IsNotEmpty(newTimeStamp);
107107
IsNotNull(newTimeStamp);
108+
AreNotEqual(timeStamp, newTimeStamp);
108109
}
109110

110111
[Test]

0 commit comments

Comments
 (0)