This commit is contained in:
51
Metrics/Metrics.cs
Normal file
51
Metrics/Metrics.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
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
|
||||
Reference in New Issue
Block a user