This commit is contained in:
Jacob Dubin
2026-05-19 06:03:34 -05:00
parent 6bae858da9
commit 54b32bc9cf
41 changed files with 135 additions and 117 deletions

View File

@@ -60,8 +60,9 @@ public sealed class FileProtocolTelemetrySinkTests : IDisposable
Assert.Contains("Notification_20150505", contents);
Assert.DoesNotContain(Path.Combine("bin", "Debug"), captureFile, StringComparison.OrdinalIgnoreCase);
Assert.Contains(indexLines, line => line.Contains("\"eventType\":\"protocol_record\"", StringComparison.Ordinal));
Assert.Contains(indexLines,
line => line.Contains("\"eventType\":\"protocol_record\"", StringComparison.Ordinal));
Assert.Contains(indexLines, line => line.Contains("\"servicePrefix\":\"Notification_20150505\"",
StringComparison.Ordinal));
}
}
}

View File

@@ -163,7 +163,8 @@ public sealed class JiboCloudProtocolServiceTests
Method = "POST",
ServicePrefix = "Update_20160715",
Operation = "CreateUpdate",
BodyText = """{"fromVersion":"1.0.0","toVersion":"1.0.1","changes":"Restore proof","subsystem":"robot"}"""
BodyText =
"""{"fromVersion":"1.0.0","toVersion":"1.0.1","changes":"Restore proof","subsystem":"robot"}"""
});
await firstService.DispatchAsync(new ProtocolEnvelope
@@ -209,16 +210,15 @@ public sealed class JiboCloudProtocolServiceTests
Assert.NotNull(secondInfo.LastLoadedUtc);
Assert.NotNull(secondInfo.LastSavedUtc);
Assert.NotEmpty(updatesPayload.RootElement.EnumerateArray());
Assert.Contains(updatesPayload.RootElement.EnumerateArray(), item => item.GetProperty("changes").GetString() == "Restore proof");
Assert.Contains(updatesPayload.RootElement.EnumerateArray(),
item => item.GetProperty("changes").GetString() == "Restore proof");
Assert.NotEmpty(backupsPayload.RootElement.EnumerateArray());
Assert.Contains(backupsPayload.RootElement.EnumerateArray(), item => item.TryGetProperty("Name", out var name) && name.GetString() == "manual-backup");
Assert.Contains(backupsPayload.RootElement.EnumerateArray(),
item => item.TryGetProperty("Name", out var name) && name.GetString() == "manual-backup");
}
finally
{
if (File.Exists(persistencePath))
{
File.Delete(persistencePath);
}
if (File.Exists(persistencePath)) File.Delete(persistencePath);
}
}
@@ -345,4 +345,4 @@ public sealed class JiboCloudProtocolServiceTests
Assert.Contains(people,
person => string.Equals(person.LoopId, store.GetLoops()[0].LoopId, StringComparison.OrdinalIgnoreCase));
}
}
}