@@ -23,7 +23,7 @@ public class RedirectHandlerTest {
2323 String differenthosturl = "https://graph.abc.com/v1.0/" ;
2424
2525 @ Test
26- public void testIsRedirectedFailure () {
26+ public void testIsRedirectedFailureByNoLocationHeader () {
2727 RedirectHandler redirectHandler = RedirectHandler .INSTANCE ;
2828 HttpGet httpget = new HttpGet (testmeurl );
2929 HttpResponse response = new BasicHttpResponse (HttpVersion .HTTP_1_1 , HttpStatus .SC_MOVED_TEMPORARILY , "Moved Temporarily" );
@@ -38,7 +38,7 @@ public void testIsRedirectedFailure() {
3838 }
3939
4040 @ Test
41- public void testIsRedirectedFailure1 () {
41+ public void testIsRedirectedFailureByStatusCodeBadRequest () {
4242 RedirectHandler redirectHandler = RedirectHandler .INSTANCE ;
4343 HttpGet httpget = new HttpGet (testmeurl );
4444 HttpResponse response = new BasicHttpResponse (HttpVersion .HTTP_1_1 , HttpStatus .SC_BAD_REQUEST , "Bad Request" );
@@ -54,7 +54,7 @@ public void testIsRedirectedFailure1() {
5454 }
5555
5656 @ Test
57- public void testIsRedirectedSuccess () {
57+ public void testIsRedirectedSuccessWithStatusCodeMovedTemporarily () {
5858 RedirectHandler redirectHandler = RedirectHandler .INSTANCE ;
5959 HttpGet httpget = new HttpGet (testmeurl );
6060 HttpResponse response = new BasicHttpResponse (HttpVersion .HTTP_1_1 , HttpStatus .SC_MOVED_TEMPORARILY , "Moved Temporarily" );
@@ -70,7 +70,7 @@ public void testIsRedirectedSuccess() {
7070 }
7171
7272 @ Test
73- public void testIsRedirectedSuccess1 () {
73+ public void testIsRedirectedSuccessWithStatusCodeMovedPermanently () {
7474 RedirectHandler redirectHandler = RedirectHandler .INSTANCE ;
7575 HttpGet httpget = new HttpGet (testmeurl );
7676 HttpResponse response = new BasicHttpResponse (HttpVersion .HTTP_1_1 , HttpStatus .SC_MOVED_PERMANENTLY , "Moved Permanently" );
@@ -86,7 +86,7 @@ public void testIsRedirectedSuccess1() {
8686 }
8787
8888 @ Test
89- public void testIsRedirectedSuccess2 () {
89+ public void testIsRedirectedSuccessWithStatusCodeTemporaryRedirect () {
9090 RedirectHandler redirectHandler = RedirectHandler .INSTANCE ;
9191 HttpGet httpget = new HttpGet (testmeurl );
9292 HttpResponse response = new BasicHttpResponse (HttpVersion .HTTP_1_1 , HttpStatus .SC_TEMPORARY_REDIRECT , "Temporary Redirect" );
@@ -102,7 +102,7 @@ public void testIsRedirectedSuccess2() {
102102 }
103103
104104 @ Test
105- public void testIsRedirectedSuccess3 () {
105+ public void testIsRedirectedSuccessWithStatusCodeSeeOther () {
106106 RedirectHandler redirectHandler = RedirectHandler .INSTANCE ;
107107 HttpGet httpget = new HttpGet (testmeurl );
108108 HttpResponse response = new BasicHttpResponse (HttpVersion .HTTP_1_1 , HttpStatus .SC_SEE_OTHER , "See Other" );
@@ -193,7 +193,7 @@ public void testGetRedirectForPostMethod() {
193193 }
194194
195195 @ Test
196- public void testGetRedirectForPostMethod1 () {
196+ public void testGetRedirectForPostMethodWithStatusCodeSeeOther () {
197197 RedirectHandler redirectHandler = RedirectHandler .INSTANCE ;
198198 HttpPost httppost = new HttpPost (testurl );
199199 HttpResponse response = new BasicHttpResponse (HttpVersion .HTTP_1_1 , HttpStatus .SC_SEE_OTHER , "See Other" );
0 commit comments