public void NewtonsoftSerialization_Success() { // Arrange var report = new EndpointDiagnostics { Id = "xyz", Local = "local", State = ServiceState.Connected }; // Act var result = Newtonsoft.Json.JsonConvert.SerializeObject(report); // Assert Assert.NotNull(result); _testOutputHelper.WriteLine(result); }
public void SystemTextJsonSerialization_Success() { // Arrange var report = new EndpointDiagnostics { Id = "xyz", Local = "local", State = ServiceState.Connected }; // Act var result = JsonSerializer.Serialize <IEndpointDiagnostics>(report); // Assert Assert.NotNull(result); _testOutputHelper.WriteLine(result); }
public void ToString_Success() { // Arrange var report = new EndpointDiagnostics { Id = "xyz", Local = "local", State = ServiceState.Connected }; // Act var result = report.ToString(); // Assert Assert.NotNull(result); _testOutputHelper.WriteLine(result); }