52 lines
1.2 KiB
C#
52 lines
1.2 KiB
C#
using System;
|
|
using Xunit;
|
|
using Newtonsoft.Json.Linq;
|
|
using FluentAssertions;
|
|
using System.Collections.Generic;
|
|
using System.Collections.Concurrent;
|
|
|
|
namespace raven_integration
|
|
{
|
|
|
|
public class Metrics
|
|
{
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
[Fact]
|
|
public async void TextMetricsShouldFetch()
|
|
{
|
|
ApiTextResponse t = await Util.GetTextResultAsync("Metrics/TextSnapShot", await Util.GetTokenAsync("OpsAdminFull"));
|
|
|
|
Util.ValidateHTTPStatusCode(t, 200);
|
|
|
|
t.TextResponse.Should().StartWith("# TIMESTAMP:");
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
[Fact]
|
|
public async void JsonMetricsShouldFetch()
|
|
{
|
|
ApiResponse a = await Util.GetAsync("Metrics/JsonSnapShot", await Util.GetTokenAsync("OpsAdminFull"));
|
|
|
|
Util.ValidateDataReturnResponseOk(a);
|
|
|
|
a.ObjectResponse["data"]["timestamp"].Should().NotBeNull();
|
|
((JArray)a.ObjectResponse["data"]["contexts"]).Count.Should().BeGreaterThan(0);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
//==================================================
|
|
|
|
}//eoc
|
|
}//eons
|