예제 #1
0
        public async Task  VersionUnknown()
        {
            MockServer.Given(Request.Create().WithPath("/ping").UsingGet())
            .RespondWith(Response.Create().WithStatusCode(204));

            Assert.AreEqual("unknown", await FluxClient.VersionAsync());
        }
예제 #2
0
        public async Task Version()
        {
            MockServer.Given(Request.Create().WithPath("/ping").UsingGet())
            .RespondWith(Response.Create().WithStatusCode(204)
                         .WithHeader("X-Influxdb-Version", "1.7.0"));

            Assert.AreEqual("1.7.0", await FluxClient.VersionAsync());
        }
예제 #3
0
        public async Task Error()
        {
            MockServer.Stop();

            try
            {
                await FluxClient.VersionAsync();

                Assert.Fail();
            }
            catch (InfluxException e)
            {
                Assert.IsNotEmpty(e.Message);
            }
        }