Skip to content

Commit 0a2d8d4

Browse files
author
Adrian Hall
committed
(#199) Fixing build/test errors in GHA
1 parent db8e37f commit 0a2d8d4

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

tests/CommunityToolkit.Datasync.Client.Test/Offline/OperationsQueueManager_Tests.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public void GetEntityMap_Works()
4040
public async Task GetExistingOperationAsync_InvalidId_Throws()
4141
{
4242
ClientMovie movie = new() { Id = "###" };
43-
Func<Task> act = async () => _ = await queueManager.GetExistingOperationAsync(context.Entry(movie));
43+
Func<Task> act = async () => _ = await queueManager.GetExistingOperationAsync(this.context.Entry(movie));
4444
await act.Should().ThrowAsync<DatasyncException>();
4545
}
4646
#endregion
@@ -134,8 +134,8 @@ public async Task PushAsync_Addition_Works()
134134
ClientMovie responseMovie = new(TestData.Movies.BlackPanther) { Id = clientMovie.Id, UpdatedAt = DateTimeOffset.UtcNow, Version = Guid.NewGuid().ToString() };
135135
string expectedJson = DatasyncSerializer.Serialize(responseMovie);
136136
this.context.Handler.AddResponseContent(expectedJson, HttpStatusCode.Created);
137-
138-
PushResult results = await queueManager.PushAsync([ typeof(ClientMovie) ], new PushOptions());
137+
138+
PushResult results = await queueManager.PushAsync([typeof(ClientMovie)], new PushOptions());
139139
results.IsSuccessful.Should().BeTrue();
140140
results.CompletedOperations.Should().Be(1);
141141
results.FailedRequests.Should().BeEmpty();
@@ -365,7 +365,7 @@ public async Task PushOperationAsync_Throws_InvalidType()
365365
EntityType = typeof(Entity1).FullName,
366366
ItemId = "123",
367367
EntityVersion = string.Empty,
368-
Item = """{}""",
368+
Item = "{}",
369369
Sequence = 0,
370370
Version = 0
371371
};
@@ -407,7 +407,7 @@ public void NullAsEmpty_Works(string value, string expected)
407407
[Fact]
408408
public void ToOperationKind_Invalid_Throws()
409409
{
410-
EntityState sut = EntityState.Detached;
410+
const EntityState sut = EntityState.Detached;
411411
Action act = () => _ = sut.ToOperationKind();
412412
act.Should().Throw<InvalidOperationException>();
413413
}
@@ -501,8 +501,10 @@ public async Task LLP_ModifyAfterInsertInNewContext_NoPush_ShouldUpdateOperation
501501
ClientMovie storedClientMovie = newLlpContext.Movies.First(m => m.Id == id);
502502

503503
// ensure that it is a lazy loading proxy and not exactly a ClientMovie
504+
#pragma warning disable CA2263 // Prefer generic overload when type is known
504505
storedClientMovie.GetType().Should().NotBe(typeof(ClientMovie))
505506
.And.Subject.Namespace.Should().Be("Castle.Proxies");
507+
#pragma warning restore CA2263 // Prefer generic overload when type is known
506508

507509
storedClientMovie.Title = TestData.Movies.MovieList[1].Title;
508510
newLlpContext.SaveChanges();

0 commit comments

Comments
 (0)