Example #1
0
        public void GET_AuditCallAuditGet(string url)
        {
            var request     = new HttpRequestMessage(HttpMethod.Get, url);
            var routeTester = new RouteTester(configuration, request);

            Assert.AreEqual(routeTester.GetControllerType(), typeof(AuditController));
            Assert.AreEqual(routeTester.GetActionName(), nameof(AuditController.Get));
        }
        public void GET_DeploymentCallDeploymentGet(string url)
        {
            var request = new HttpRequestMessage(HttpMethod.Get, url);
            var routeTester = new RouteTester(configuration, request);

            Assert.AreEqual(routeTester.GetControllerType(), typeof(DeploymentController));
            Assert.AreEqual(routeTester.GetActionName(), nameof(DeploymentController.Get));
        }
Example #3
0
        public void DELETE_DeploymentCallDeploymentPost()
        {
            var url         = "http://localhost/application/name/deployment/name";
            var request     = new HttpRequestMessage(HttpMethod.Delete, url);
            var routeTester = new RouteTester(configuration, request);

            Assert.AreEqual(routeTester.GetControllerType(), typeof(DeploymentController));
            Assert.AreEqual(routeTester.GetActionName(), nameof(DeploymentController.Delete));
        }
Example #4
0
        public void PUT_ApplicationUrlCallsApplicationPost()
        {
            var url         = "http://localhost/application/name";
            var request     = new HttpRequestMessage(HttpMethod.Put, url);
            var routeTester = new RouteTester(configuration, request);

            Assert.AreEqual(routeTester.GetControllerType(), typeof(ApplicationController));
            Assert.AreEqual(routeTester.GetActionName(), nameof(ApplicationController.Put));
        }
Example #5
0
        public void PUT_HealthCallsPut()
        {
            var url         = "http://localhost/health?healthy=true";
            var request     = new HttpRequestMessage(HttpMethod.Put, url);
            var routeTester = new RouteTester(configuration, request);

            Assert.AreEqual(routeTester.GetControllerType(), typeof(HealthController));
            Assert.AreEqual(routeTester.GetActionName(), nameof(HealthController.Put));
        }
Example #6
0
        public void POST_AuditCallAddComment()
        {
            var url         = "http://localhost/application/name/audit/id/comments";
            var request     = new HttpRequestMessage(HttpMethod.Post, url);
            var routeTester = new RouteTester(configuration, request);

            Assert.AreEqual(routeTester.GetControllerType(), typeof(AuditController));
            Assert.AreEqual(routeTester.GetActionName(), nameof(AuditController.AddComment));
        }
        public void POST_DeploymentCallDeploymentPost()
        {
            var url = "http://localhost/application/name/deployment/name";
            var request = new HttpRequestMessage(HttpMethod.Post, url);
            var routeTester = new RouteTester(configuration, request);

            Assert.AreEqual(routeTester.GetControllerType(), typeof(DeploymentController));
            Assert.AreEqual(routeTester.GetActionName(), nameof(DeploymentController.Post));
        }
        public void PUT_ApplicationUrlCallsApplicationPost()
        {
            var url = "http://localhost/application/name";
            var request = new HttpRequestMessage(HttpMethod.Put, url);
            var routeTester = new RouteTester(configuration, request);

            Assert.AreEqual(routeTester.GetControllerType(), typeof(ApplicationController));
            Assert.AreEqual(routeTester.GetActionName(), nameof(ApplicationController.Put));
        }
        public void PUT_HealthCallsPut()
        {
            var url = "http://localhost/health?healthy=true";
            var request = new HttpRequestMessage(HttpMethod.Put, url);
            var routeTester = new RouteTester(configuration, request);

            Assert.AreEqual(routeTester.GetControllerType(), typeof(HealthController));
            Assert.AreEqual(routeTester.GetActionName(), nameof(HealthController.Put));
        }
        public void POST_AuditCallAddComment()
        {
            var url = "http://localhost/application/name/audit/id/comments";
            var request = new HttpRequestMessage(HttpMethod.Post, url);
            var routeTester = new RouteTester(configuration, request);

            Assert.AreEqual(routeTester.GetControllerType(), typeof(AuditController));
            Assert.AreEqual(routeTester.GetActionName(), nameof(AuditController.AddComment));
        }