Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions test/EFCore.Cosmos.FunctionalTests/CosmosConcurrencyTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,26 +95,26 @@ public async Task Etag_is_updated_in_entity_after_SaveChanges(bool? contentRespo
var customerFromStore = await context.Set<Customer>().SingleAsync();

Assert.NotEmpty(customerFromStore.ETag);
Assert.Equal(etag, customerFromStore.ETag);
Assert.Equal(etag.Trim('"'), customerFromStore.ETag.Trim('"'));

customerFromStore.Children.Add(new DummyChild { Id = "1" });

await context.SaveChangesAsync();

Assert.NotEmpty(customerFromStore.ETag);
Assert.NotEqual(etag, customerFromStore.ETag);
Assert.NotEqual(etag.Trim('"'), customerFromStore.ETag.Trim('"'));

customerFromStore.Children.Add(new DummyChild { Id = "2" });

Assert.NotEmpty(customerFromStore.ETag);
Assert.NotEqual(etag, customerFromStore.ETag);
Assert.NotEqual(etag.Trim('"'), customerFromStore.ETag.Trim('"'));

customerFromStore.Children.Add(new DummyChild { Id = "3" });

await context.SaveChangesAsync();

Assert.NotEmpty(customerFromStore.ETag);
Assert.NotEqual(etag, customerFromStore.ETag);
Assert.NotEqual(etag.Trim('"'), customerFromStore.ETag.Trim('"'));
}
}

Expand Down Expand Up @@ -161,26 +161,26 @@ public async Task Etag_is_updated_in_derived_entity_after_SaveChanges(bool? cont
var customerFromStore = await context.Set<PremiumCustomer>().SingleAsync();

Assert.NotEmpty(customerFromStore.ETag);
Assert.Equal(etag, customerFromStore.ETag);
Assert.Equal(etag.Trim('"'), customerFromStore.ETag.Trim('"'));

customerFromStore.Children.Add(new DummyChild { Id = "1" });

await context.SaveChangesAsync();

Assert.NotEmpty(customerFromStore.ETag);
Assert.NotEqual(etag, customerFromStore.ETag);
Assert.NotEqual(etag.Trim('"'), customerFromStore.ETag.Trim('"'));

customerFromStore.Children.Add(new DummyChild { Id = "2" });

Assert.NotEmpty(customerFromStore.ETag);
Assert.NotEqual(etag, customerFromStore.ETag);
Assert.NotEqual(etag.Trim('"'), customerFromStore.ETag.Trim('"'));

customerFromStore.Children.Add(new DummyChild { Id = "3" });

await context.SaveChangesAsync();

Assert.NotEmpty(customerFromStore.ETag);
Assert.NotEqual(etag, customerFromStore.ETag);
Assert.NotEqual(etag.Trim('"'), customerFromStore.ETag.Trim('"'));
}
}

Expand Down
Loading