Exemplo n.º 1
0
        public void RespondToGetRequest()
        {
            var controller = new KpisController();
            var result     = controller.Get();

            Assert.NotNull(result);
        }
Exemplo n.º 2
0
        public void ListAverageDurationEndpoint()
        {
            var controller = new KpisController();

            var result = controller.Get();

            Assert.Contains(result, endpoint =>
                            endpoint.Name == "Average Request Duration" &&
                            endpoint.Description == "Average duration of requests for the preceding 24 hours" &&
                            endpoint.Route == "api/kpis/averageDuration"
                            );
        }
Exemplo n.º 3
0
        public void ListErrorRateEndpoint()
        {
            var controller = new KpisController();

            var result = controller.Get();

            Assert.Contains(result, endpoint =>
                            endpoint.Name == "Error Rate" &&
                            endpoint.Description == "Average error rate for the preceding hour" &&
                            endpoint.Route == "api/kpis/errorRate"
                            );
        }