Exemple #1
0
        public void Going_to_a_non_existent_page_should_return_not_found()
        {
            var client = new WebClientBuilder(_host, "/home/idontexist")
                         .Build();

            client.Get();

            Assert.Equal(HttpStatusCode.NotFound, client.LastHttpStatusCode);
        }
Exemple #2
0
        public void Going_to_the_exception_page_should_return_error()
        {
            var client = new WebClientBuilder(_host, "/home/throw")
                         .Build();

            client.Get();

            Assert.Equal(HttpStatusCode.InternalServerError, client.LastHttpStatusCode);
        }
Exemple #3
0
        public void Going_to_the_my_bio_page_is_valid()
        {
            var client = new WebClientBuilder(_host, "/mybio")
                         .Build();

            client.Get();

            Assert.Equal(HttpStatusCode.OK, client.LastHttpStatusCode);
        }
Exemple #4
0
        public void Going_to_the_roi_page_is_valid()
        {
            var client = new WebClientBuilder(_host, "/projects/roi")
                         .Build();

            client.Get();

            Assert.Equal(HttpStatusCode.OK, client.LastHttpStatusCode);
        }
Exemple #5
0
        public void Going_to_the_legacy_recent_projects_page_should_return_redirect()
        {
            var client = new WebClientBuilder(_host, "/home/recentprojects")
                         .Build();

            client.Get();

            Assert.Equal(HttpStatusCode.MovedPermanently, client.LastHttpStatusCode);
            Assert.Equal("/projects",
                         client.LastHttpResponseHeaders.Where(x => x.Key.ToLower() == "location").FirstOrDefault().Value.FirstOrDefault(),
                         ignoreCase: true);
        }